note 111826 deleted from features.commandline.webserver by aharvey
| From: | aharvey@php.net | Date: | Thu, 04 Apr 2013 03:38:31 +0000 |
| Subject: | note 111826 deleted from features.commandline.webserver by aharvey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-194325@lists.php.net to get a copy of this message | ||
Note Submitter: wcode404 at gmail dot com
----
File specified in 'auto_prepend_file' not include in router.
Call in cmd to route request
# php -S localhost:8000 router.php
# router.php
<?php
// auto prepend
if (($filename = ini_get('auto_prepend_file')) && $filename != 'none') {
if (file_exists($filename)) { // absolute path
include $filename;
} else { // relative path
foreach (explode(PATH_SEPARATOR, get_include_path()) as $path) {
if ($file = realpath($path.DIRECTORY_SEPARATOR.$filename)) {
include $file;
break;
}
}
}
}
// do route ...