I have a really easy Q for you guys, looked around for it on google and php.net but couldn't an answer
What i am trying to do is find out the current path of the script im running, and then use the basename function to figure out the base name of the path.
Finding out current path of script
Moderator: General Moderators
- AVATAr
- Forum Regular
- Posts: 524
- Joined: Tue Jul 16, 2002 4:19 pm
- Location: Uruguay -- Montevideo
- Contact:
check this out:
- http://www.php.net/variables.predefined
- http://www.php.net/manual/en/reserved.v ... les.server
- http://www.php.net/variables.predefined
- http://www.php.net/manual/en/reserved.v ... les.server
Code: Select all
<?php
echo $_SERVER['SCRIPT_FILENAME'];
?>-
sleepingdanny
- Forum Newbie
- Posts: 12
- Joined: Thu Mar 20, 2003 4:27 am
- Location: Israel
This will show you the path to the script you are running:
Code: Select all
_FILE_