Page 1 of 1

php

Posted: Wed May 27, 2009 9:06 am
by flip-mode
I am "getting started" with php. I am trying to echo the output of a function. I have not gotten it to work yet. Here is how I am going about it:

<html><body>
<?php echo "testing echo output" ?> //this works and shows up in the browser

<?php
$currdir = dirname($SERVER['PHP_SELF']);
echo $currdir;  //this does not work.
?>

</body></html>


So, who can tell the noob why he is failing?

Re: php

Posted: Wed May 27, 2009 9:09 am
by flip-mode
Aw crap, I figured it out. $SERVER should be $_SERVER.

It's all about the details.