getting the url or even just a relative path
Posted: Wed Jul 11, 2007 8:42 am
hi all...i have some xml that i need to utilize to give relative paths to where that xml file is...so, if the xml is in
thisFolder>xmlFiles>filename.xml
i need php to echo "thisFolder/xmlFiles/"
i have played with getcwd()
but on the server, it gives more info than i want (ie, the root, and all before "thisFolder" ie.../home/virtual/site191/fst/var/www/html/website.com/projects/thisFolder/xmlFiles/)....any ideas?
edit** i need to be clear...i just want the path, minus the file name.....
thisFolder>xmlFiles>filename.xml
i need php to echo "thisFolder/xmlFiles/"
i have played with getcwd()
Code: Select all
<?php $p=getcwd(); echo($p."/");?>edit** i need to be clear...i just want the path, minus the file name.....