NYCPHP Meetup

NYPHP.org

[nycphp-talk] PROBLEM: passing variables to FILE()

Néstor 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.

Thanks!!!!

Néstor :-)

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
> string
> >>for the input file parameter:
> >>
> http://maggie.sdcwa.org/eng/list/client_find_project_list.phtml?proj_name=CATHODIC
> >>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
> will.
>
> Ken
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20061025/16858cf1/attachment.html>


More information about the talk mailing list