Use dirname() with predefined variable $SCRIPT_FILENAME to obtain the complete path of the script executing the command : dirname « File Directory « PHP






Use dirname() with predefined variable $SCRIPT_FILENAME to obtain the complete path of the script executing the command

 
<?
   $dir = dirname($SCRIPT_FILENAME);
   print $dir;
?>
  
  








Related examples in the same category

1.dirname.php