473,241 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

Including files that have query strings

I am having trouble with accessing files with query strings. For
example the code "require 'template.php?102932'" gives the following
error:
Warning: main(/www/blog/template.php?102932): failed to open stream:
Invalid argument in C:\www\blog\2004\12\27\best-of-2004\index.php on
line 54

Fatal error: main(): Failed opening required
'/www/blog/template.php?102932' (include_path='.;c:\php4\pear') in
C:\www\blog\2004\12\27\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.

Jul 17 '05 #1
1 1470
*** th******@gmail.com escribió/wrote (21 Jan 2005 23:25:19 -0800):
Warning: main(/www/blog/template.php?102932): failed to open stream:
Invalid argument in C:\www\blog\2004\12\27\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.


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.

<?
$foo=102932;
require('template.php');
?>

--
-+ Á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
--
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Logical | last post by:
I wanted to do: include('page.htm?id=12&foo=bar'); But since I can't (and don't want to make another seperate HTTP request with include('http://...')); I was wondering if there's a function...
3
by: Matthew Moran | last post by:
I am creating a series of downloadable articles, career tools, spreadsheets, etc. However, some of the content is for "registered" guest. The registrants are stored in a database and logon. I...
5
by: Raj | last post by:
Hi all, Can anyone help me with a script which would delete files or move them to a different folder at some scheduled time..! Please.....!!! Thanks in advance...
3
by: Sean Quinn | last post by:
Hi, I don't know if anyone has run into similar problems, but it seems like when I use `require_once(...)' with files that contain functions I get an error indicating that it can't redeclare the...
12
by: Bahman | last post by:
Hello! I have one issue that I am trying to work out. I am creating an RSS XML feed. However, I want the user at the other end to be able to query the XML file, for example, display only...
8
by: dagecko | last post by:
Hi I would like to know how to detect if a file is binary or not. It's important for me but I don't know where to start. Ty
4
by: TCook | last post by:
Hey All, I am building a solution which will have many strings that will need to be localized (i.e. strings for toolbars, strings for different WinForms, strings for messages and error messages,...
7
by: mark4asp | last post by:
How can I prevent Caching of JavaScript and CSS files ONLY when I deploy a new application? I only want to force a refresh the first time the client uses the new build. For instance, I'm told I...
5
by: Raman | last post by:
Hi All, We have an old code base which (unfortunatelty) has some C files that include other C files:e.g File.c ===== #include<stdio.h> .. void someFunc(){
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.