Archive

Posts Tagged ‘php __FILE__’

PHP: get absolute path to current folder / directory

June 14th, 2008 No comments
PHP: get absolute path to current folder / directory The simple way : Use php function getcwd like this: $base_folder = getcwd(); result in $base_folder is string to current path/folder without end trail, / . or use php constant called __FILE__ define(’ABSLPATH’, dirname(__FILE__).’/'); where ABSLPATH contains a string with end trail /. Example for use: require_once(ABSPATH.’wp-settings.php’);
GoCache - ByREV-Cache v1.0 - live served in : 0.346748 sec (gzip)