note 110372 added to function.include-once

From: Date: Tue, 16 Oct 2012 15:21:30 +0000
Subject: note 110372 added to function.include-once
Groups: php.notes 
Request: Send a blank email to php-notes+get-191332@lists.php.net to get a copy of this message
PHP can distinguish if file is a symlink while including. I've created example.php file containing code below: <?php print __FILE__.' included'; ?> Then I've created symlink to example.php in the same directory. Executing this code in the working directory: <?php include_once 'example.php'; include_once 'symlink'; ?> prints only 'example.php included' instead of 2 lines. ---- Server IP: 69.147.83.199 Probable Submitter: 77.253.14.245 ---- Manual Page -- http://www.php.net/manual/en/function.include-once.php Edit -- https://master.php.net/note/edit/110372 Del: integrated -- https://master.php.net/note/delete/110372/integrated Del: useless -- https://master.php.net/note/delete/110372/useless Del: bad code -- https://master.php.net/note/delete/110372/bad+code Del: spam -- https://master.php.net/note/delete/110372/spam Del: non-english -- https://master.php.net/note/delete/110372/non-english Del: in docs -- https://master.php.net/note/delete/110372/in+docs Del: other reasons-- https://master.php.net/note/delete/110372 Reject -- https://master.php.net/note/reject/110372 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#191332) next »