haaki Posted June 5, 2009 Share Posted June 5, 2009 I started learning php for the first time today, but I did not get further than my first "Hello World!", before the problems started. <?php echo "<h1>Hello World!</h1>"; ?> Gives this screen: My question: Why is the ;?> displayed? Is it a bad installation of php or apache? It displays correctly when I upload it to my host and display it "online": http://www.hakonkavli.com/first.php Can someone guide me to the solution of this problem? Thank you very much! Edit: Oh, by the way: To test my php and apache install I created a file phpinfo.php with the code: <?php phpinfo(); ?> It shows up correctly when I go to http://localhost/phpinfo.php, but is blank when I open the file from c: I don't know if it matters to the problem solution, but I thought it might be relevant. Quote Link to comment Share on other sites More sharing options...
justAnoob Posted June 5, 2009 Share Posted June 5, 2009 <?php echo "Hello World!!!!"; ?> Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted June 5, 2009 Share Posted June 5, 2009 The PHP processor is invoked by the webserver. The webserver is not started when you use the "file://" protocol, only when you use "http://". You didn't do anything wrong. Ken Quote Link to comment 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.