note 125974 added to features.commandline.webserver

From: Date: Wed, 31 Mar 2021 06:33:46 +0000
Subject: note 125974 added to features.commandline.webserver
Groups: php.notes 
Request: Send a blank email to php-notes+get-219280@lists.php.net to get a copy of this message
If you have trouble with a project using both dynamic routes containing dots (giving unexpected 404 errors) and static file hosting paste this in your index.php // Support cli server for local development if (php_sapi_name() === 'cli-server') { $fileName = __DIR__.parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH); if (file_exists($fileName) && !is_dir($fileName)) return false; } Then run the internal server directly on the file: php -S 127.0.0.1 index.php ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.85.242 (proxied: 82.168.243.125) ---- Manual Page -- http://php.net/manual/en/features.commandline.webserver.php Edit -- https://master.php.net/note/edit/125974 Del: integrated -- https://master.php.net/note/delete/125974/integrated Del: useless -- https://master.php.net/note/delete/125974/useless Del: bad code -- https://master.php.net/note/delete/125974/bad+code Del: spam -- https://master.php.net/note/delete/125974/spam Del: non-english -- https://master.php.net/note/delete/125974/non-english Del: in docs -- https://master.php.net/note/delete/125974/in+docs Del: other reasons-- https://master.php.net/note/delete/125974 Reject -- https://master.php.net/note/reject/125974 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#219280) next »