note 108102 added to features.commandline.webserver

From: Date: Wed, 28 Mar 2012 15:41:26 +0000
Subject: note 108102 added to features.commandline.webserver
Groups: php.notes 
Request: Send a blank email to php-notes+get-186893@lists.php.net to get a copy of this message
I tried to access SVG files via the built-in webserver, but only a download dialog was shown. So I use this router script to accomplish my needs. Maybe it is useful to someone. Bye <?php $path = pathinfo($_SERVER["SCRIPT_FILENAME"]); if($path["extension"] == "svg") { header("Content-Type: image/svg+xml"); readfile($_SERVER["SCRIPT_FILENAME"]); } else return FALSE; ?> ---- Server IP: 69.147.83.197 Probable Submitter: 88.72.104.29 ---- Manual Page -- http://www.php.net/manual/en/features.commandline.webserver.php Edit -- https://master.php.net/note/edit/108102 Del: integrated -- https://master.php.net/note/delete/108102/integrated Del: useless -- https://master.php.net/note/delete/108102/useless Del: bad code -- https://master.php.net/note/delete/108102/bad+code Del: spam -- https://master.php.net/note/delete/108102/spam Del: non-english -- https://master.php.net/note/delete/108102/non-english Del: in docs -- https://master.php.net/note/delete/108102/in+docs Del: other reasons-- https://master.php.net/note/delete/108102 Reject -- https://master.php.net/note/reject/108102 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#186893) next »