简体   繁体   中英

Why php code written below require is not executing?

I have a php script where If I write some code above the require statement it works, but If I write below the require statement nothing happens, no errors, warnings nothing.

here is my code:

require ("../../include/session.php");
require ("include/--.php");
require ("include/--.php");
require ("include/--.php");

Everything I write above this require statements it works but anything below these don't.

Could anyone please tell my why this is happening.

检查您require的文件,也许是无限循环require的文件。

You need to have error reporting on. There is probably an error in some of your required files, and default behaviour for an PHP-conf is to die silently (at least with the preconfigured installation in the Ubuntu packages). There could also be an error with your file names.

Add:

error_reporting(E_ALL);

in the top of your main PHP-file (the one that has the requires).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM