Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Test file_get_contents() function : variation - include path testing --CREDITS-- ..
Decoded Output download
*** Testing file_get_contents() : variation ***
Did this file decode correctly?
Original Code
--TEST--
Test file_get_contents() function : variation - include path testing
--CREDITS--
Dave Kelsey <[email protected]>
--FILE--
<?php
echo "*** Testing file_get_contents() : variation ***\n";
require_once('fopen_include_path.inc');
// this doesn't create the include dirs in this directory
// we change to this to ensure we are not part of the
// include paths.
$thisTestDir = "FileGetContentsVar2.dir";
mkdir($thisTestDir);
chdir($thisTestDir);
$filename = 'FileGetContentsVar2.tmp';
$scriptLocFile = __DIR__."/".$filename;
$newpath = create_include_path();
set_include_path($newpath);
runtest();
teardown_include_path();
chdir("..");
rmdir($thisTestDir);
function runtest() {
global $scriptLocFile, $filename;
$h = fopen($scriptLocFile, "w");
fwrite($h, "File in script location");
fclose($h);
$line = file_get_contents($filename, true);
echo "$line\n";
unlink($scriptLocFile);
}
?>
--EXPECT--
*** Testing file_get_contents() : variation ***
File in script location
Function Calls
None |
Stats
MD5 | e9720e57927b07d5a4d684caaca009a9 |
Eval Count | 0 |
Decode Time | 110 ms |