PDA

View Full Version : Beginner at PHP...



samba_7
July 27th, 2003, 08:37 AM
: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:

ahmed
July 27th, 2003, 08:41 AM
just have it on it's own, without any html :)

Voetsjoeba
July 27th, 2003, 08:43 AM
Don't forget the first <? :) 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 :)

samba_7
July 27th, 2003, 08:59 AM
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.

ahmed
July 27th, 2003, 09:18 AM
lycos.com supports php and mysql, for free :)