运行xampp之后,apache成功连接但是php文件中输入代码:​<?php
echo '<p>hello world</p>';
test ?>火狐浏览器打开之后,显示的是:hello world'; test ?> 而输入代码:<?php
phpinfo(); ?>界面为空白。http://localhost/xampp/index.php 是可以正常打开的不知道是哪里的问题。求帮助!

解决方案 »

  1.   

    打开PHP 的错误提示 你就知道了 不用猜
      

  2.   

    我这这显示的是调用没有声明的变量test
      

  3.   

    第一輸出hello world
    Notice: Use of undefined constant test - assumed 'test' in /Users/xxxx/index.php on line 3
    第二正常
      

  4.   

    ?test 没搞明白那个是什么东西
     看到报错的 未定义的‘test’  
    <?php   echo" <p> hello word</p>";
    ?>
      

  5.   

    test是个啥?
    <?php 
    #这里面都应该是php代码
    #你想输出test应该这么写:
    echo "test";
    #而不是直接写test
    ?>