Download src/php/php-src/sapi/cgi/tests/009.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 523 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/sapi/cgi/tests/009.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/sapi/cgi/tests/009.phpt
-
curl -L -o 009.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/sapi/cgi/tests/009.phpt
523 Bytes
| --TEST-- | |
| path info request without exported PATH_INFO | |
| --SKIPIF-- | |
| include "skipif.inc"; | |
| --FILE-- | |
| include "include.inc"; | |
| $php = get_cgi_path(); | |
| reset_env_vars(); | |
| $f = tempnam(sys_get_temp_dir(), 'cgitest'); | |
| putenv("TRANSLATED_PATH=".$f."/x"); | |
| putenv("SCRIPT_FILENAME=".$f."/x"); | |
| file_put_contents($f, '<?php var_dump($_SERVER["TRANSLATED_PATH"]); ?>'); | |
| echo (`$php -n $f`); | |
| echo "Done\n"; | |
| @unlink($f); | |
| --EXPECTF-- | |
| X-Powered-By: PHP/%s | |
| Content-type: text/html%r; charset=.*|%r | |
| string(%d) "%s/x" | |
| Done | |