Re: replace special characters

From: Date: Thu, 24 Feb 2005 08:27:49 +0000
Subject: Re: replace special characters
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-209318@lists.php.net to get a copy of this message
On Thursday 24 February 2005 16:14, Frank Arensmeier wrote: > 1) replace ".." with a string like "file://server/folder" > 2) replace all "\" characters with "/". > > The PHP code looks something like: > > $path_to_file = "..\1 PDF Filer\65051.PDF"; $path_to_file = '..\1 PDF Filer\65051.PDF'; Don't use double-quoted strings unless you *need* to. Ditto for the rest of your code. > The big problem is the character "\" which, if I got it right, in > UNICODE is used for things like expressing line breaks ('\n' or > something like this). "\n" is a newline character, however it has nothing to do with unicode, RTFM for details. > The code above is resulting in the following > error massage: "Parse error: parse error, expecting `')'' in > /xxx/xxx/xxx/TMPz06yoces6o.php on line 2." Switch to using a decent syntax highlighting editor and these types of errors will be immediately obvious. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ New Year Resolution: Ignore top posted posts

« previous php.general (#209318) next »