Mar 5, 2004 #1 maverick MIS Apr 21, 1999 193 US Hello all ! How do I get the current directory ? so I can make my code a little more dynamic Thanks "Hacker by Heart" saenzcorp@hotpop.com
Hello all ! How do I get the current directory ? so I can make my code a little more dynamic Thanks "Hacker by Heart" saenzcorp@hotpop.com
Mar 5, 2004 Thread starter #2 maverick MIS Apr 21, 1999 193 US ok, this gets me the path getcwd() But it appears to be a dos path and not a web path, Now how do I remove everything I don't need ? trim it ? "Hacker by Heart" saenzcorp@hotpop.com Upvote 0 Downvote
ok, this gets me the path getcwd() But it appears to be a dos path and not a web path, Now how do I remove everything I don't need ? trim it ? "Hacker by Heart" saenzcorp@hotpop.com
Mar 6, 2004 1 #3 sleipnir214 Programmer May 6, 2002 15,350 US I recommend that you take a look at the values in the superglobal array $_SERVER. Want the best answers? Ask the best questions! TANSTAAFL!! Upvote 0 Downvote
I recommend that you take a look at the values in the superglobal array $_SERVER. Want the best answers? Ask the best questions! TANSTAAFL!!
Mar 9, 2004 Thread starter #4 maverick MIS Apr 21, 1999 193 US Thanks , thats what I needed ! "Hacker by Heart" saenzcorp@hotpop.com Upvote 0 Downvote
Mar 9, 2004 Thread starter #5 maverick MIS Apr 21, 1999 193 US OK, now I just need to trim off the file name... this is what I got so far: <?php $result= $_SERVER['PHP_SELF'] ; $result = rtrim($result, ' ???? ') ; echo $result ; ?> it give me this: /directory/filename.ext But I need to trim off the filename.ext any ideas what to replace ???? with to acomplish this ? tia "Hacker by Heart" saenzcorp@hotpop.com Upvote 0 Downvote
OK, now I just need to trim off the file name... this is what I got so far: <?php $result= $_SERVER['PHP_SELF'] ; $result = rtrim($result, ' ???? ') ; echo $result ; ?> it give me this: /directory/filename.ext But I need to trim off the filename.ext any ideas what to replace ???? with to acomplish this ? tia "Hacker by Heart" saenzcorp@hotpop.com
Mar 9, 2004 #6 sleipnir214 Programmer May 6, 2002 15,350 US Instea of rtrim(), I recommend you take a look at pathinfo() Want the best answers? Ask the best questions! TANSTAAFL!! Upvote 0 Downvote
Instea of rtrim(), I recommend you take a look at pathinfo() Want the best answers? Ask the best questions! TANSTAAFL!!
Mar 9, 2004 Thread starter #7 maverick MIS Apr 21, 1999 193 US Thanks ! I read that and now have: /directory and that I can deffinatly work with ! Thanks for your help !!!! You Rock ! I have another Q but I will post out of this topic This topic is solved ! thanks to sleipnir214 "Hacker by Heart" saenzcorp@hotpop.com Upvote 0 Downvote
Thanks ! I read that and now have: /directory and that I can deffinatly work with ! Thanks for your help !!!! You Rock ! I have another Q but I will post out of this topic This topic is solved ! thanks to sleipnir214 "Hacker by Heart" saenzcorp@hotpop.com