Personal computing discussed

Moderators: SecretSquirrel, just brew it!

 
flip-mode
Gerbil Khan
Topic Author
Posts: 9322
Joined: Thu May 08, 2003 12:42 pm
Location: Cincinnati, OH

php

Wed May 27, 2009 9:06 am

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?
 
flip-mode
Gerbil Khan
Topic Author
Posts: 9322
Joined: Thu May 08, 2003 12:42 pm
Location: Cincinnati, OH

Re: php

Wed May 27, 2009 9:09 am

Aw crap, I figured it out. $SERVER should be $_SERVER.

It's all about the details.

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests