note 69248 added to function.get-included-files

From: Date: Mon, 28 Aug 2006 17:30:58 +0000
Subject: note 69248 added to function.get-included-files
Groups: php.notes 
Request: Send a blank email to php-notes+get-116438@lists.php.net to get a copy of this message
Something that's not noted in the docs, if a file is included remotely and you do a get_included_files() in the include itself it will *not* return the document that included it. ie: test2.php (server 192.168.1.14): <?php include("http://192.168.1.11/test/test3.php"); ?> test3.php (server 192.168.1.11): <?php $files = get_included_files(); print_r($files); ?> returns: Array ( [0] => /var/www/localhost/htdocs/test/test3.php ) Which means you can use get_included_files() to help intercept and prevent XSS-style attacks against your code. ---- Server IP: 64.71.164.2 Probable Submitter: 24.32.145.186 ---- X-Spam-Status: No, hits=3.6 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, NORMAL_HTTP_TO_IP autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.get-included-files.php Edit -- https://master.php.net/note/edit/69248 Del: integrated -- https://master.php.net/note/delete/69248/integrated Del: useless -- https://master.php.net/note/delete/69248/useless Del: bad code -- https://master.php.net/note/delete/69248/bad+code Del: spam -- https://master.php.net/note/delete/69248/spam Del: non-english -- https://master.php.net/note/delete/69248/non-english Del: in docs -- https://master.php.net/note/delete/69248/in+docs Del: other reasons-- https://master.php.net/note/delete/69248 Reject -- https://master.php.net/note/reject/69248 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#116438) next »