Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Including files that have query strings
January 22, 2005, 5:25 am
rate this thread
example the code "require 'template.php?102932'" gives the following
Warning: main(/www/blog/template.php?102932): failed to open stream:
Invalid argument in C:\www\blog04\best-of-2004\index.php on
Fatal error: main(): Failed opening required
'/www/blog/template.php?102932' (include_path='.;c:\php4\pear') in
C:\www\blog04\best-of-2004\index.php on line 54
I have no idea what's going on. Is it impossible to open files with
query strings in PHP? I am running PHP 4.3.9 on Apache 2/Win.
- Alvaro G. Vicario
January 22, 2005, 5:26 pm
Re: Including files that have query strings
Files do not have query strings. URLs do have query strings.
If you want to create a variable to use in the included file, why don't you
just, well, do it? Including a file is exactly the same as copying its
contents in current file.
-+ Álvaro G. Vicario - Burgos, Spain
+- http://www.demogracia.com (la web de humor barnizada para la intemperie)
++ Las dudas informáticas recibidas por correo irán directas a la papelera
-+ I'm not a free help desk, please don't e-mail me your questions