Below are the list of PHP predefined Magic Constants PHP Magic Constants Name Description __LINE__ The current line number of the file. __FILE__ The full path and filename of the file with symlinks resolved. If used inside an include, the name of the included file is returned. __DIR__ The directory of the file. If used […]
If you would like to know from which page the request has come from using post Method then there is a simple PHP script can solve your issue. Get Current Page URL Using PHP Check below script to Get Current page using PHP function getCurrentURLPage() { $s = empty($_SERVER[“HTTPS”]) ? ”: ($_SERVER[“HTTPS”] == “on”) ? […]
Below simple program will export mysql data values to excel sheet without using any PHP libraries. Export to Excel Using PHP and Mysql <!–?php </p> <p>//write your db connection</p> <p>$xlsFile= ‘file_’.date(‘Y-m-d’).’.xls’; <br ?–>$separator = "t";</pre> $sql = "Select * from emp"; $Connect = @mysql_connect($DB_Server, $DB_Username, $DB_Password) or die("Failed to connect: " . mysql_error() . " […]