note 108547 deleted from features.commandline.webserver by sixd

From: Date: Tue, 15 May 2012 00:53:32 +0000
Subject: note 108547 deleted from features.commandline.webserver by sixd
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-187979@lists.php.net to get a copy of this message
Note Submitter: Pablo Giancarelli ---- 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; ?>

« previous php.notes (#187979) next »