opcache_get_status() returns array, so square brackets should be used to access "opcache_enabled" value.
21 lines
374 B
PHP
21 lines
374 B
PHP
<?php
|
|
|
|
if (isset($_GET['chdir']) && $_GET['chdir'] != "") {
|
|
if (!chdir($_GET['chdir'])) {
|
|
echo "failure to chdir(" . $_GET['chdir'] . ")\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
$opcache = -1;
|
|
|
|
if (function_exists('opcache_get_status')) {
|
|
$status = opcache_get_status();
|
|
$opcache = $status['opcache_enabled'];
|
|
}
|
|
|
|
header('X-OPcache: ' . $opcache);
|
|
|
|
print(getcwd());
|
|
?>
|