Beginner at PHP

:player:

I’m just starting on Php scripting. I looked at a few examples here, and have pondered a simple question?

I am using the phpinfo() function. Now do I simply add:

<?
phpinfo();
?>

Do i add this to a texfile, save it as info.php ? Or do I add the html that goes with this? (The usual html/head/body tags THEN the little piece of code?

Thanks

Sam
:bandit:

just have it on it’s own, without any html :slight_smile:

Don’t forget the first <**? :slight_smile: So the code would look like this:


<?
phpinfo();
?>

Then just copy/paste this to notepad, save as info.php and you’re ready to go :slight_smile:

Thanks for the quick reply.

I’m using yahoo as my webserver - I’ve upgraded to their service that allows PHP. Now they tell me that it is php enabled but I don’t think my account is active for that just yet… hence the reason why I was asking if I was scripting right…

It costs $11.95/month for 50MB of webspace + all their goodies…

Anyone know of another place?

Sam.

lycos.com supports php and mysql, for free :slight_smile: