Jump to content

Echo Trouble


johne281

Recommended Posts

Hi. I have learned html and css and now i am learning php and mysql. I am following some video tutorials and he wants me to create a file called helloworld.php with the following code:

 

<html>

<head>

<title>Hello World</title>

</head>

<body>

<?php echo "Hello World!"; ?>

</body>

</html>

 

I have done that and when i view the file in a browser it is a blank document named Hello World. I have done this part before and it worked fine. What am i doing wrong now? Please help. This is so frustrating. Im sure it is just me overlooking something minor. Any help would be appreciated.

Link to comment
https://forums.phpfreaks.com/topic/164173-echo-trouble/
Share on other sites

If it's worked before you must have a local server and php set up and in place. Are you accessing the file via the server?

 

If you just double click the .php file it will open from its 'Computer Directory' C:/ etc...

 

You need to ensure its accessed via a browser with the correct protocol, most likely http://localhost/ to access the root of your server

Link to comment
https://forums.phpfreaks.com/topic/164173-echo-trouble/#findComment-866033
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.