note 48560 added to function.readfile

From: Date: Wed, 29 Dec 2004 16:29:23 +0000
Subject: note 48560 added to function.readfile
Groups: php.notes 
Request: Send a blank email to php-notes+get-82461@lists.php.net to get a copy of this message
readfile() makes a handy include for what you know should be plain HTML or text. Sloppy and/or lazy scripters can introduce security risks when using include() and require() in such a way that users can tell the script what file(s) to include. This is because the PHP code contained in any file they refer to is executed with PHP's privledges. With readfile(), any PHP code is passed to the output buffer as-is, without being executed. ---- Manual Page -- http://www.php.net/manual/en/function.readfile.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48560 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48560&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48560&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48560&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48560&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48560&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48560&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48560&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#82461) next »