Files
nginx-unit/test/php/cwd/index.php
Tiago Natel de Moura 80763b3e64 Tests: chdir() and open() for PHP module.
These tests ensure optimizations in the chdir calls don't break
SAPI semantics.
2020-03-03 18:53:26 +00:00

20 lines
349 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')) {
$opcache = opcache_get_status()->opcache_enabled;
}
header('X-OPcache: ' . $opcache);
print(getcwd());
?>