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 #171532 is a reply to message #171530] Fri, 07 January 2011 22:49 Go to previous messageGo to previous message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma:
Senior Member
On Fri, 7 Jan 2011 13:22:25 -0800 (PST), Modafinil wrote:
> On Jan 8, 1:13?am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> PHP scripts run on the server, so if you request a PHP script from
>> another server, it will run on the remote. ?You will get only the output
>> from that script, just as if you were to request it from a browser.
>>
>> But rather than set variables before including the script, check out
>> functions and passing parameters to them. ?It makes your code much more
>> maintainable and reliable.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================- Hide quoted text -
>>
>> - Show quoted text -
>
> Yep, wanting to send querystrings to included local PHP files was my
> shortcut to calling included files' functions, and supplying them with
> parameters. Thinking about it, that might be a tidier solution than
> using parent script variables, that appear as globals in the included
> script, as parameter containers. I can't guarantee that
> REGISTER_GLOBALS will always be enabled, though it appears to be on
> the server I'm using, and included file functions may be called more
> than once. It seems you only get one shot at running code in the
> global scope, when executing it by inclusion from a parent script.

http://php.net/manual/en/function.getopt.php

You can use that to define optional parameters that (can) duplicate what
you'd otherwise have passed on a HTTP request. There's no
"REGISTER_GLOBALS" for this, so you don't even have to get used to it.

And, yeah, you'll want to sanitize the stuff coming in via the options
similar to how you'd sanitize the stuff coming in on a request.

--
The only thing I'd use on guinea-fowl is a shredder. Same with
peacocks. The sound of peacocks being shredded can't possibly be any
worse than the sound of peacocks not being shredded.
-- Tanuki
[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: Sun Nov 10 16:34:29 GMT 2024

Total time taken to generate the page: 0.03943 seconds