weisoo
V2EX  ›  问与答

有人用 c9.io 在线编辑 php 项目吗? file_get_contents('test1.php')读不出内容怎么回事?

  •  1
     
  •   weisoo · Feb 27, 2015 · 2355 views
    This topic created in 4118 days ago, the information mentioned may be changed or developed.
    echo file_get_contents('test1.php');
    test1.php是在同一个目录。这一句代码在我家的电脑上能读出内容,但是在c9.io的开发环境里就读不出文件内容,没有报错,也没有显示任何东西。

    但是如果读的是一个txt文件,就可以读出来,例如
    echo file_get_contents('test2.txt');
    这样就正常。

    是限制了读到php文件吗?在哪里可以修改呢?
    weisoo
        1
    weisoo  
    OP
       Feb 27, 2015
    弄错了,是浏览器问题,代码没问题,大家不用回复了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5192 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 05:55 · PVG 13:55 · LAX 22:55 · JFK 01:55
    ♥ Do have faith in what you're doing.