I want to include() a php file located on my server, with additional GET attributes.
But it won't work:
include('search.php?q=1');
The error it gives:
PHP Warning: include(): Failed opening './search.php?q=1' for inclusion
Seems like it tries to open a file literally named 'search.php?q=1' instead of opening the 'search.php' file and sending it the GET attributes.
*Note that it does work if I don't put any GET attributes:
include('search.php');
includeon the other hand, just reads and interprets the file directly from the file system, no web server involved. These are two different processes.includecan use URIs ifallow_url_includeandallow_url_fopenis enabled.