Question:

PHP ? am a newbie in php programming and i have this problem

by  |  earlier

0 LIKES UnLike

I open the macromedia and select php, when i paste the following code <?php

echo "Hello, world!";

?>

between body> it does not display the hello world, instead , it displays an icon showing php only in design view . what the problem ?

 Tags:

   Report

5 ANSWERS


  1. Hey,

    I remember this problem years ago, back of course when I first touched PHP, or any server-side scripting language.

    That&#039;s exactly it, it&#039;s a server-side scripting language, which means you need to have this website on a server that has Apache, which is a php compiling solution!

    Watch this video, it&#039;ll guide you through a tutorial on how to install Apache on ur computer instead of using a server!

    Hope this helps. Let me know if there&#039;s anything else

    Thanks,

    Abdurrahman Qadan

    Video:

    http://www.killerphp.com/videos/getting_...


  2. get notepad ++

  3. Maybe, you should try some simple hand-coded php outside of Macromedia.

    I like to upload my php files to my web-hosting service and test them just once where they are going to be run.  You could setup php on your client computer and run from there, but I decided to just upload my php files to my web-hosting service and test them under the actual conditions that they would be running in.

    Remember to change your file extensions from .htm or .html to be .php

  4. maybe you forgot the &quot;:&quot;

    echo:

  5. Macromedia Dreamweaver can&#039;t execute server side php code so it just displays the ? to represent where it is in your HTML. When you upload this to a web server and display it your should see &quot;Hello, world!&quot;.

Question Stats

Latest activity: earlier.
This question has 5 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.