Aoidas
Joined: 07 Nov 2003 Posts: 5
|
Posted: Sun Nov 09, 2003 12:02 am Post subject: Image upload parse error |
|
|
Hello,
I have MS IIS 5 (PHP, MySQL, b2 ), and I enabled images uploading, but then I try to upload image I get such error:
Code: | Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in c:\inetpub\wwwroot\blog\b2upload.php on line 150 |
and b2upload.php 150 line should be this:
Code: | if (strlen($imgalt)) {
$pathtofile = $fileupload_realpath."\".$imgalt;
$img1 = $HTTP_POST_VARS['img1'];
} else {
$pathtofile = $fileupload_realpath."\".$img1_name;
$img1 = $HTTP_POST_FILES['img1']['tmp_name'];
}
|
I replaced slash realpath."/".$ with realpath."\".$, because otherwise I get error:
Code: | Unable to upload file to C:\Inetpub\wwwrootimages\blog/img.jpg |
So, in one way I get some server error, in other way - incorrect path in Windows.
Do you have any ideas how to fix this?
(sorry, if there was such theme, and I didn't found it.. And thank you! ) |
|