PHP works on server, not with EXEOut


#1

Hoping for a little php help from more advanced users than myself.

For life of me cannot figure out why the below code works on local and live server, but not with EXEOut. All it does is check a file for a string.

$storagelocation = exo_getglobalvariable('HEPubStorageLocation', '');
$data = '';
$file = $storagelocation.'teachersid/compare.php';
if (file_exists(stream_resolve_include_path($file)))
$data = file_get_contents($storagelocation.'teachersid/compare.php');
if(strpos($data, 'AbcD09876') !== FALSE)
{
echo 'FOUND!';
}
else
{
echo 'NOT FOUND!';
}

compare.php simply holds a different teacherid on each line. There is of course a lot more code involved, but this simple example will not even work.

Is there any certain php extensions that should be active? At loss why not working with EXEOut.

Thanks in advance.


#2

Never mind, seems that windows PHP versions is bad about caching “stream_resolve_include_path”. So with some tweaks can prevent caching.