Reputation: 4052
My PHP files are not able to call the include function anymore. I suppose my hosting changed php settings. Is there any workaround to this problem? Can I enable the include function in php.ini/.htaccess files? How? My host is using PHP version 4.4.9.
EDIT - All the files that I am trying to include are local files and not files on another server. The include functions were working fine until a few days back. They have suddenly stopped working.
Upvotes: 0
Views: 484
Reputation: 490489
This looks and feels wrong, but could this work?
function includeFile($path) {
if (!file_exists($path)) {
return false;
}
$contents = file_get_contents($path);
eval($contents); // ewww
return true;
}
Upvotes: 0
Reputation: 690
Maybe your host changed the path to your www.
Are you using relative or absolute paths in your include()?
Upvotes: 0
Reputation: 125604
i think is permission problem,
do you see error in error log file ,
or see error in the screen ?
Upvotes: 2