View Full Version : dirname(__FILE__)
02-27-2007, 10:01 PM
dirname(__FILE__): what does it do ?
02-27-2007, 11:45 PM
___FILE___ is a magical constant (http://us3.php.net/manual/en/language.constants.predefined.php) and dirname() (http://us3.php.net/manual/en/function.dirname.php)is a function and you put em together for good times.
02-28-2007, 03:12 PM
__FILE__ shows the current file path. Unlike $_SERVER['SCRIPT_FILENAME'] which shows the current parent file being processed, __FILE__ with show the actual filepath the code is written in.
dirname() is like basename() but reverse returning the directory path of the filepath string passed.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.