Archive

Posts Tagged ‘getcwd’

PHP Current Folder – 6 Solution

February 21st, 2009 No comments
PHP Current Folder – 6 Solution using getcwd (Gets the current working directory) $current_directory = getcwd(); using dirname (Returns directory name component of path) $current_directory = dirname(__FILE__); <=== The Fastest or $current_directory = dirname($_SERVER["SCRIPT_FILENAME"]); or $current_directory = dirname( $_SERVER["DOCUMENT_ROOT"].$_SERVER["PHP_SELF"] ); using substr (Return part of a string) and strrpos (Find position of first occurrence ...
GoCache - ByREV-Cache v1.0 - live served in : 0.388464 sec (gzip)