RE: [PHP] File upload?

From: Date: Thu, 24 Jul 2003 23:30:15 +0000
Subject: RE: [PHP] File upload?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-156768@lists.php.net to get a copy of this message
> $uploaddir = 'C:\Inetpub\wwwroot\pix'; > $filnamn=$_FILES['userfile']['name']; > I thought of just adding a backslash at the very end of the $uploaddir > variable but that just leaves me with this error-message instead: > > Parse error: parse error, unexpected T_STRING in > c:\inetpub\wwwroot\alterdb\upload2.php on line 25 > > Line 25 happens to be that $filnamn line you can see above. > > I'm at a loss as to what could be the problem so any suggestions > to where to > look? > Since a ' comes right after the \ it is escaping it. Instead escape the \ so it is interpreted as \ and not the escape character. $uploaddir = 'C:\Inetpub\wwwroot\pix\\';

« previous php.general (#156768) next »