note 108547 added to features.commandline.webserver
| From: | PabloGiancarelli | Date: | Sat, 05 May 2012 13:16:41 +0000 |
| Subject: | note 108547 added to features.commandline.webserver | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-187485@lists.php.net to get a copy of this message | ||
Trying to access files with ".htm" extension from certain web browsers (".html"
files were shown ok) I got a download dialog.
Based on other examples I've seen, this router script did the job:
<?php
$path = pathinfo($_SERVER['SCRIPT_FILENAME']);
if($path['extension'] == 'htm') {
header('Content-Type: text/html');
readfile($_SERVER['SCRIPT_FILENAME']);
}
else return FALSE;
?>
----
Server IP: 69.147.83.197
Probable Submitter: 190.191.74.247
----
Manual Page -- http://www.php.net/manual/en/features.commandline.webserver.php
Edit -- https://master.php.net/note/edit/108547
Del: integrated -- https://master.php.net/note/delete/108547/integrated
Del: useless -- https://master.php.net/note/delete/108547/useless
Del: bad code -- https://master.php.net/note/delete/108547/bad+code
Del: spam -- https://master.php.net/note/delete/108547/spam
Del: non-english -- https://master.php.net/note/delete/108547/non-english
Del: in docs -- https://master.php.net/note/delete/108547/in+docs
Del: other reasons-- https://master.php.net/note/delete/108547
Reject -- https://master.php.net/note/reject/108547
Search -- https://master.php.net/manage/user-notes.php