FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Logic behind this?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Logic behind this? [message #171494 is a reply to message #171491] Sun, 29 September 2013 16:00 Go to previous messageGo to previous message
j80k-vpfc is currently offline  j80k-vpfc
Messages: 10
Registered: September 2013
Karma:
Junior Member
In article <v0mgv7-clc(dot)ln1(at)qqqqq(dot)xs4all(dot)nl>, Luuk(at)invalid(dot)lan (Luuk)
wrote:

> *From:* Luuk <Luuk(at)invalid(dot)lan>
> *Date:* Thu, 06 Jan 2011 12:35:30 +0100
>
> On 06-01-11 12:11, Modafanil wrote:
>> I tried to include one PHP file from within another one that is
>> running on a webserver:
>>
>> require_once('test.php?message=this');
>>
>> Without the query string the inclusion works fine. Add the query
>> string, however, and the server refuses with 'can't find a
>> matching file or directory'.
>>
>> Wouldn't PHP be a more consistent language if it were possible to
>> pass query strings during file inclusion, and then be able to
>> access the parameters as maybe $_SERVER['QUERY_STRING'] or
>> $_GET['message'] within the included file?
>>
>> I'd be interested to hear from anyone that can rationalise the
>> current file inclusion functions' behavior.
>>
>> M.
>>
>>
>>
>
> Did you look at example#3 on
> http://www.php.net/manual/en/function.include.php
>
> It says you can do it, when you specify an URL, and not a filename
> which
> contains question marks.
>
>
> For consistency, i dont see an advantage of specifying more
> parameters
> to an 'include' or 'require'..
>
> --
> Luuk
>
I'm not sure what use that is.. do you want to 'include' a chunk of code?
If that's the case, the variables are available without being passed
surely?
Alternatively, are you trying to include the /output/ of another script?

- Steve
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: the changeover to mysqli
Next Topic: [urgent] need solution of Questions, in context of PHP5
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 12:08:02 GMT 2024

Total time taken to generate the page: 0.05832 seconds