$_SERVER[“DOCUMENT_ROOT”] === /home/user/www$_SERVER[“SERVER_ADDR”] === 143.34.112.23$_SERVER[‘HTTP_HOST’] === example.com (or with WWW)$_SERVER[“REQUEST_URI”] === /folder1/folder2/yourfile.php?var=blabla#123__FILE__ === /home/user/www/folder1/folder2/yourfile.php —>//p.s. ON WINDOWS SERVERS, instead of / is basename(__FILE__) === yourfile.php__DIR__ === /home/user/www/folder1/folder2 [same: dirname(__FILE__)]$_SERVER[“QUERY_STRING”] === var=blabla#123$_SERVER[“REQUEST_URI”] === /folder1/folder2/yourfile.php?var=blabla#123 parse_url($_SERVER[“REQUEST_URI”], PHP_URL_PATH) === /folder1/folder2/yourfile.php $_SERVER[“PHP_SELF”] === /folder1/folder2/yourfile.php//if “parentfile.php” includes this “yourfile.php”(and inside it are the codes written), and “parentfile.php?a=123” is opened, then$_SERVER[“PHP_SELF”] […]
If you are looking for How to Get Source Code of a Web Page or link then just follow below steps. How To Find A Web Page’s Source Code it easy? Source Code of a Web Page Contents show 1. Source Code of a Web Page 2. Source Code of a Web Page in PHP […]
You can initilize local settings in a php file.You can set values like max_execution_time, default_socket_timeout, memory_limit, mysql.connect_timeout, user_ini.cache_ttl, display_errors and log_errorsit always nice to check the errors in PHP files with error_reporting. Below is the sample script to set ini_set values. If you dont want to set every time in PHP script simply set the […]