2

I have installed WAMP server 2.0 with (PHP 5.4.3). After installing WAMP I have restarted all the services and can open

  • phpinfo() - it is showing up fine
  • phpmyadmin - it is also showing up fine.. i can play with database..

however when run simple php file in chrome I could see the code rather than result. below is the code i am trying..

<?php
echo "hello world";
?>

below is the link to file which I am trying to access via chrome. file:///C:/WAMP/www/hello%20world.php

4

2 回答 2

1
  • Make sure you have started apache
  • Try http://localhost/hello_horld.php
于 2013-03-31T02:54:08.867 回答
1

To run this script, start a browser use URL http://localhost/your_file.php or http://127.0.0.1/your_file.php

PHP is a server-side technology (instead of client-side technology like JavaScript). The PHP statements <?php ... ?> are processed in the server, and the results returned to the client (browser). so you need to use it through server not direct

于 2013-03-31T02:54:21.607 回答