各位大虾,请教一个问题:我在写一个php的网页,所有的功能在本地 通过 localhost/../index.php访问,一切正常。
因为涉及到别人访问的问题,于是我将代码拷贝到服务器的/var/www上,结果代码运行错误,后来一看,是卡在这里了,但是不知道为什么。代码如下:<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <?php
        
        echo "11111111";
        include_once('./cebu_parser.php');
        eccho "2222222"
        include_once('./flight_info_2_json.php');        $cebu_parser = new cebu_parser();        ?>
    </body>
</html>在服务器上,只能运行到 echo "111111111", 查看生成的html代码如下:<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        11111111111
也就是说代码只运行到第一句echo哪里。我也将 include_once 替换成 include, require_once,require,都一个样子。也尝试了 try catch的方法,但还是没有任何信息输出。恳请各位解惑,谢谢
服务器PHP

解决方案 »

  1.   

    没明白解决你的什么问题。
    不过对于include其实没什么,明白php的内核机制就好了。
    http://www.laruence.com/2010/05/04/1450.html
    你可以参考一下,写的还是不错的
      

  2.   

    cebu_parser.php
    这里面exit了吧?
      

  3.   

    error_reporting(E_ALL);如果还是不行,贴出你的cebu_parser.php文件代码 
      

  4.   

    谢谢各位参与。问题找到了,是有一个文件中用到的方法在服务器上无法正确执行,所以在include的时候,他无法解释执行,所以直接不错了。但想不通,我本地的系统也没记着装了什么其他组件啊。再次感谢大家!!!