PDA

View Full Version : Showing Path..



Hypertext
30-03-2007, 09:24 PM
What have I done wrong :s



<?php
$path = $_SERVER['PHP_SELF'];

$valuesArray = explode("/",$path);


foreach ($valuesArray as $value){

$name = explode(".",$value);
echo $name[0];

if($name[1] == ""){
echo " &nbsp; &gt; &nbsp;";
}
}

?>

Its supposed to show the path :P

Recursion
30-03-2007, 09:30 PM
works for me...

I put the PHP File in: /path1/path2/path3TOM!!/ on my server and the PHP File showed: > path1 > path2 > path3TOM!! > path

The last path is the file name...

Hypertext
30-03-2007, 09:52 PM
yeh oh it did work.. i put it in a test file. which contains ALOT of fatal errors ;P

Hypertext
30-03-2007, 09:55 PM
I might publish that script :PPP

Want to hide these adverts? Register an account for free!