summaryrefslogblamecommitdiffhomepage
path: root/test/php/cwd/index.php
blob: eb2cc5b32540a3c086abe0ed0b350a4a7d3da013 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                          
                                   
                                                      





                                 
<?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'] ? '1' : '0';
}

header('X-OPcache: ' . $opcache);

print(getcwd());
?>