[nycphp-talk] PROBLEM: passing variables to FILE()
rotsen at gmail.com
Wed Oct 25 11:38:50 EDT 2006
Michael + Ken
Using urlencode did the trick. I was surprise that $_GET will urldecode
the variables automatically.
On 10/24/06, Ken Robinson <kenrbnsn at rbnsn.com> wrote:
> At 11:15 PM 10/24/2006, Michael Southwell wrote:
> >At 07:39 PM 10/24/2006, you wrote:
> >>HI people,
> >>I am trying to read a file using "file" and I am passing the following
> >>for the input file parameter:
> >>PROTECTION OF RAMONA PIPELINE PHASE 2&show=1
> >>phpinfo shows:
> >>_GET["proj_name"] CATHODIC
> >>_SERVER["SERVER_PROTOCOL"] PROTECTION OF RAMONA PIPELINE PHASE
> >>2&show=1 HTTP/1.0
> >>Somehow the variables data being passed as an argument are split.
> >You can't pass a space, so you need to replace all spaces in the
> >argument with the html entity equivalent, in this case %20, before
> >you try to pass it. You can do this with str_replace().
> No, you shouldn't use the htmlentities() function, since that will
> not encode spaces. You should use the urlencode() function, since that
> New York PHP Community Talk Mailing List
> NYPHPCon 2006 Presentations Online
> Show Your Participation in New York PHP
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk