Php configuration file setting Sample code
- // Each page defines the constants allowed to access the file
- Define ('is _ access', true );
-
- /**
- **************************************** ********
- * **************** 1. basic configuration
- **************************************** ********
- */
-
- // Exit the program if IS_ACCESS is not defined
- If (! Defined ('is _ access') exit ();
-
- // Allow cross-origin access to private data
- Header ('p3p: CP = "NOI CURa ADMa DEVa TAIa OUR DELa bus ind phy onl uni com nav int dem pre "');
-
- // Disable caching the current document
- Header ("Cache-Control: no-store, no-cache, must-revalidate ");
- Header ("Cache-Control: post-check = 0, pre-check = 0", false );
- Header ("Pragma: no-cache ");
-
- // Set the header to UTF-8
- Header ('content-Type: text/html; charset = UTF-8 ');
-
- // All error levels are displayed in the report.
- Error_reporting (E_ALL );
-
- // Do not try to get the sessionid (PHPSESSID? ???? ??? ??)
- Ini_set ('session. use_trans_sid ', 0 );
-
- // Disable PHPSESSID (??? PHPSESSID? ??????? ????)
- Ini_set ("url_rewriter.tags ","");
-
- /**
- **************************************** ********
- * **************** 2. environment configuration
- **************************************** ********
- */
-
- // Define the path
- Define ('_ SOLUTION_PATH __','');
- Define ('', $ _ SERVER ['document _ root']. _ SOLUTION_PATH __.'/');
-
- Define ('_ HOME _', _ SOLUTION_PATH __.'/');
- Define ('_ INCLUDE _',. '_ Include /');
- Define ('_ ADMIN _', _ HOME _. 'admin /');
- Define ('_ DOMAIN _', $ _ SERVER ['server _ name']);
-
- // Import classes and library files
- Require_once (_ INCLUDE _. 'class/class. mysql. php ');
-
- // Set the table
- Define ('member', 'member ');
|