Re: [PHP] include through HTTP

2002-04-13 Thread Barýþ


file.php does more than one jobs depending on
HTTP_GET_VARS. for example if "..?mod=show" or it is
empty it shows things, elseif "..?mod=update" it
updates... so i must send a variable to the included
file but i can't do it in the file that includes it.
The file that includes file.php is a template file
which holds the design of the site and each page is
included in to that template. 
My English is not very good so if you can't see a
reason not to do it your way i will try to write a
more clear explanation.
Thank you!
Oh! that's an important point:
on index.php(the template file) it decides which file
to include with a switch.
//querystring: /index.php?page=a_page
switch $page
case "a_page":
  $inc = "http://$myhost/a_page.php";;
case "another_page":
  $inc =
"http://$myhost/a_page.php?mod=something";;

include($inc);





--- Rasmus Lerdorf <[EMAIL PROTECTED]> wrote:
> Why do you want to include from localhost over HTTP?
>  Sounds to me like
> you want to do:
> 
> $foo='bar';
> include "$DOCUMENT_ROOT/folder/file.php";
> 
> -Rasmus
> 
> On Fri, 12 Apr 2002, Barí¥²t wrote:
> 
> > What i want to do is :
> >
> include("http://localhost/folder/file.php?foo=bar";);
> > but it doesn't work. As you may guess it looks for
> a
> > file called "file.php?foo=bar". "url_fopen" is set
> to
> > "on" in my php.ini file as told in the PHP manual.
> > I work on win98+apache+php4.1.1(or something like
> that
> > but at least 4.1...)
> > Do you know what's the problem?
> > Info about this subject is on
> > http://www.php.net/manual/en/function.include.php
> > ...
> >
> > __
> > Do You Yahoo!?
> > Yahoo! Tax Center - online filing with TurboTax
> > http://taxes.yahoo.com/
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit:
> http://www.php.net/unsub.php
> >
> 


__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] include through HTTP

2002-04-12 Thread Rasmus Lerdorf

Why do you want to include from localhost over HTTP?  Sounds to me like
you want to do:

$foo='bar';
include "$DOCUMENT_ROOT/folder/file.php";

-Rasmus

On Fri, 12 Apr 2002, Barýþ Mert wrote:

> What i want to do is :
> include("http://localhost/folder/file.php?foo=bar";);
> but it doesn't work. As you may guess it looks for a
> file called "file.php?foo=bar". "url_fopen" is set to
> "on" in my php.ini file as told in the PHP manual.
> I work on win98+apache+php4.1.1(or something like that
> but at least 4.1...)
> Do you know what's the problem?
> Info about this subject is on
> http://www.php.net/manual/en/function.include.php
> ...
>
> __
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] include through HTTP

2002-04-12 Thread Barýþ

Oh what a shame on me! Sorry and thank you...

--- "Collins, Robert" <[EMAIL PROTECTED]> wrote:
> Check the Note about 5 lines down on this page.
>
http://www.php.net/manual/en/features.remote-files.php
> 
> "Note: You can't use remote files in include() and
> require() statements on
> Windows."
> 
> Robert W. Collins II 
> Webmaster 
> New Orleans Regional Transit Authority 
> Phone : (504) 248-3826 
> Email : [EMAIL PROTECTED] 
> 
> 
> 
> -Original Message-
> From: Barýþ" Mert [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 12, 2002 8:13 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] include through HTTP
> 
> 
> What i want to do is :
> include("http://localhost/folder/file.php?foo=bar";);
> but it doesn't work. As you may guess it looks for a
> file called "file.php?foo=bar". "url_fopen" is set
> to
> "on" in my php.ini file as told in the PHP manual.
> I work on win98+apache+php4.1.1(or something like
> that
> but at least 4.1...)
> Do you know what's the problem?
> Info about this subject is on 
> http://www.php.net/manual/en/function.include.php
> ...
> 
> __
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] include through HTTP

2002-04-12 Thread Collins, Robert

Check the Note about 5 lines down on this page.
http://www.php.net/manual/en/features.remote-files.php

"Note: You can't use remote files in include() and require() statements on
Windows."

Robert W. Collins II 
Webmaster 
New Orleans Regional Transit Authority 
Phone : (504) 248-3826 
Email : [EMAIL PROTECTED] 



-Original Message-
From: Barýþ" Mert [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 12, 2002 8:13 AM
To: [EMAIL PROTECTED]
Subject: [PHP] include through HTTP


What i want to do is :
include("http://localhost/folder/file.php?foo=bar";);
but it doesn't work. As you may guess it looks for a
file called "file.php?foo=bar". "url_fopen" is set to
"on" in my php.ini file as told in the PHP manual.
I work on win98+apache+php4.1.1(or something like that
but at least 4.1...)
Do you know what's the problem?
Info about this subject is on 
http://www.php.net/manual/en/function.include.php
...

__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] include through HTTP

2002-04-12 Thread Barýþ

What i want to do is :
include("http://localhost/folder/file.php?foo=bar";);
but it doesn't work. As you may guess it looks for a
file called "file.php?foo=bar". "url_fopen" is set to
"on" in my php.ini file as told in the PHP manual.
I work on win98+apache+php4.1.1(or something like that
but at least 4.1...)
Do you know what's the problem?
Info about this subject is on 
http://www.php.net/manual/en/function.include.php
...

__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php