问题
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
回答1:
- Make sure you have started apache
- Try
http://localhost/hello_horld.php
回答2:
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
来源:https://stackoverflow.com/questions/15725854/php-or-wamp-not-sure-what