darkywarkey Posted July 5, 2008 Share Posted July 5, 2008 Trying to create a script that relies on returning the current directory of the script being run. Couldn't find any built in functions on the PhP manual... any ideas? Link to comment https://forums.phpfreaks.com/topic/113278-how-to-find-current-directory-of-script/ Share on other sites More sharing options...
darkywarkey Posted July 5, 2008 Author Share Posted July 5, 2008 Nevermind, finally found it. getcwd() Link to comment https://forums.phpfreaks.com/topic/113278-how-to-find-current-directory-of-script/#findComment-582013 Share on other sites More sharing options...
PC Nerd Posted July 5, 2008 Share Posted July 5, 2008 echo $_SERVER['SCRIPT_NAME']; echo "<br>"; echo __FILE__; echo "<br>"; echo $_SERVER['SCRIPT_FILENAME']; place that into a file to see different options. gdlk EDITED BY WILDTEEN88: Please wrap code within code tags ( ). Link to comment https://forums.phpfreaks.com/topic/113278-how-to-find-current-directory-of-script/#findComment-582039 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.