Reply to Re: urlencode a file with newlines ...

Your name:

Reply:


Posted by dbee on 02/27/06 06:39

dbee wrote:
> So I can't seem to urlencode a file with newlines ... it just gives me
> a series of T_STRING unexpected parse errors...
>
> cat job_description | while read file ; do php -r "echo
> urlencode('$file');" ; done > job_description_encoded &&
> URL_ENCODED_DESCRIPTION=`cat job_description_encoded`
>
> ... this takes in a job_description file and outputs a file with alot
> of errors in the text ... ?

oops ... it seems that I misunderstood the problem. The T_STRING error
is caused by an apostraphe in the text. I looked on php.net and it
seems to suggest that I should use rawurlencode(), but that doesn't
make any difference - I still get the error.

Also, I lose all my newlines ... I'm playing around with the cat
job_description function...

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация