Meistro Posted April 29, 2006 Share Posted April 29, 2006 Hey, I am currently reading Wrox, beginning PHP5. Apache and MySQL Web Development. Their first PHP example program is :<html><head><title> My First PHP Program</title></head><body><?phpecho "I'm a lumberjack.";?></body></html>when I run this in FireFox and I.E. It doesn't say any text in the body, just gives me the title. Is this something to do with PHP not being installed configured properly? Help! I am lost : )To recap : I wrote this in notepad, saved it to my desktop, opened it in IE and Firefox and got the title but nothing was said in the main box.BTW what does everyone think of the book I am reading, any good? Are there other, better, absolute newbie guides? Thank you Quote Link to comment https://forums.phpfreaks.com/topic/8724-absolute-beginners-question/ Share on other sites More sharing options...
AndyB Posted April 29, 2006 Share Posted April 29, 2006 I'll assume you saved the file with a .php extension ...php files are parsed on a server then sent to a browser to be rendered. In simple terms, the php script is executed on the server to generate an html file which will then display in a browser.So, two choices: #1 is upload the file to a server to test and the preferred option would be to have a server installed as localhost (your computer). If you already have that then you can view your work by browsing to [a href=\"http://localhost/yourfiles/test.php\" target=\"_blank\"]http://localhost/yourfiles/test.php[/a] for example. If you haven't installed a server on your local machine you'll need to. My personal one-click install favorite (works on all flavours of Windows) is phpdev5 from [a href=\"http://www.firepages.com.au\" target=\"_blank\"]http://www.firepages.com.au[/a], which includes php, MySQL, phpMyAdmin, and Apache - everything you need. Quote Link to comment https://forums.phpfreaks.com/topic/8724-absolute-beginners-question/#findComment-32020 Share on other sites More sharing options...
Meistro Posted April 29, 2006 Author Share Posted April 29, 2006 [!--quoteo(post=369946:date=Apr 29 2006, 03:34 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ Apr 29 2006, 03:34 PM) [snapback]369946[/snapback][/div][div class=\'quotemain\'][!--quotec--]I'll assume you saved the file with a .php extension ...php files are parsed on a server then sent to a browser to be rendered. In simple terms, the php script is executed on the server to generate an html file which will then display in a browser.So, two choices: #1 is upload the file to a server to test and the preferred option would be to have a server installed as localhost (your computer). If you already have that then you can view your work by browsing to [a href=\"http://localhost/yourfiles/test.php\" target=\"_blank\"]http://localhost/yourfiles/test.php[/a] for example. If you haven't installed a server on your local machine you'll need to. My personal one-click install favorite (works on all flavours of Windows) is phpdev5 from [a href=\"http://www.firepages.com.au\" target=\"_blank\"]http://www.firepages.com.au[/a], which includes php, MySQL, phpMyAdmin, and Apache - everything you need.[/quote]Thank you, I truly appreciate you taking the time to help me with what is likely a simple answer. I did install using 'foxserv' but have not changed any of the settings. Quote Link to comment https://forums.phpfreaks.com/topic/8724-absolute-beginners-question/#findComment-32023 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.