I came across the following feature:
$ handle = fopen (realpath ("../folder/files.php"), "r");
cannot read the file, but as soon as I remove the php tags from the file, it becomes readable, and my scripts print non-empty content on the page. Also, file.php is never executed, so I wonder why this is a problem.
I assume that Apache or PHP does not allow reading files containing PHP PHP tags as text.
How can I include it for my specific file (a course doing it globally would be unsafe)?
Using PHP 5.2.x and Apache 2.0
AlexA source
share