PHP configuration file Setup Sample code

Source: Internet
Author: User
  1. Each page definition allows access to file constants
  2. Define (' Is_access ', true);
  3. /**
  4. ************************************************
  5. 1. Basic Configuration
  6. ************************************************
  7. */
  8. If no is_access is defined, exit the program
  9. if (!defined (' is_access ')) exit ();
  10. Allow cross-domain access to private data
  11. Header (' p3p:cp= ' NOI CURa ADMa DEVa Taia our DELa BUS IND PHY ONL UNI COM NAV INT DEM PRE "');
  12. Disable caching of the current document
  13. Header ("Cache-control:no-store, No-cache, must-revalidate");
  14. Header ("Cache-control:post-check=0, pre-check=0", false);
  15. Header ("Pragma:no-cache");
  16. Header information set to Utf-8
  17. Header (' content-type:text/html; Charset=utf-8 ');
  18. Report shows all error level types
  19. Error_reporting (E_all);
  20. Don't try to get sessionid from somewhere else (phpsessid??????????)
  21. Ini_set (' Session.use_trans_sid ', 0);
  22. Prohibited links with Phpsessid (??? Phpsessid???????? ????)
  23. Ini_set ("Url_rewriter.tags", "" ");
  24. /**
  25. ************************************************
  26. 2. Environment configuration
  27. ************************************************
  28. */
  29. Define Path
  30. Define (' __solution_path__ ', ');
  31. Define (' __root__ ', $_server[' Document_root '). __solution_path__. ' /');
  32. Define (' __home__ ', __solution_path__. /');
  33. Define (' __include__ ', __root__. _include/');
  34. Define (' __admin__ ', __home__. Admin/');
  35. Define (' __domain__ ', $_server[' server_name ');
  36. Importing class and library files
  37. Require_once (__include__. ' Class/class.mysql.php ');
  38. Setting up Tables
  39. Define (' MEMBER ', ' MEMBER ');
Copy Code
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.