Include does nothing

柔情痞子 提交于 2019-12-25 00:34:41

问题


I want to chceck files before I'll connect domain on my server. I've added them in direct admin, I've uploaded files - but I don't know how to get to them.

I have 4 domains connected, but i have acces only to one. I saw that it's possible to include file from higher level

include('../../panele-podlogowe.eu/adm/img/edit.gif')

That gave me correct image. But when I've done:

include('../../panele-podlogowe.eu/index.php');

Nothing happens (I've turned Error reporting on).

When I did something like:

include('../../panele-podlogowe.eu/index.php');
echo 'Failed?';

Nothing prints out... What the heck?

Solution:

 ini_set("display_errors", "stdout");

回答1:


Review the PHP error log. That usually, even under default settings, shows what's the problem.




回答2:


Enable error reporting so php will print what is wrong. Add this at the top of your file.

error_reporting(E_ALL);

Otherwise:

  • Check the access permissions for that file
  • Double-check the file you are including for syntax errors. (if the include causes php to crash/segfault you might not get any output)


来源:https://stackoverflow.com/questions/3423702/include-does-nothing

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