PHP包含路径没有意义?

I do not understand this error :

Warning: include(): Failed opening '/app/database/alsalemcorpdb.php' for inclusion (include_path='.:/app/database/alsalemcorpdb.php') in /var/www/html/index.php on line 4

I have now explicitly mentioned the file in include_path, and CHMODed the file to 777.

My code: include ("/app/database/alsalemcorpdb.php");

Any ideas?

Unless you literally have /app as a root-level folder on the filesystem (ie. not the domain root), then you should not have a / at the beginning of your path.

Instead, try:

include("app/database/alsalemcorpdb.php");

Actually, it turned out to be SELINUX.... It causes this to fail for whatever reason, disabling it fixes the issue.