Alternative to Require()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
violet
Forum Newbie
Posts: 24
Joined: Wed May 23, 2007 12:13 pm
Location: Manila, Philippines
Contact:

Alternative to Require()

Post by violet »

Is there an alternative to require($image) that won't throw an error when I try to attach:

Code: Select all

image.php?Var1=Value1&Var2=Value2&Var3=Value3
via form-to-mail?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Re: Alternative to Require()

Post by timvw »

violet wrote:Is there an alternative to require($image) that won't throw an error when I try to attach:

Code: Select all

image.php?Var1=Value1&Var2=Value2&Var3=Value3
You could use include.. But the error is because the argument isn't a valid location... (Include http://example.com/image.php?var=value2 would work)... But if you're not in control of that URL i'd recommend strongly against it as it opens someone to inject code into your script...
User avatar
violet
Forum Newbie
Posts: 24
Joined: Wed May 23, 2007 12:13 pm
Location: Manila, Philippines
Contact:

Post by violet »

Thanks timvw..

Maybe I should first encode the contents of the generated image.php into image2.php so I could require(image2.php) instead... Hmmm Image

Hey malik, no hijacking! :P

Oh I just re-read this:
But the error is because the argument isn't a valid location...
:oops:
Post Reply