note 110372 deleted from function.include-once by philip
| From: | philip@php.net | Date: | Fri, 03 Oct 2014 06:10:57 +0000 |
| Subject: | note 110372 deleted from function.include-once by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-200574@lists.php.net to get a copy of this message | ||
Note Submitter: Kamil Pawelkiewicz
----
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.