PHP or WAMP not sure what

浪子不回头ぞ 提交于 2019-12-11 01:47:30

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!