ImageHost Upload Error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
angus
Forum Newbie
Posts: 10
Joined: Sat Sep 17, 2005 5:43 pm

ImageHost Upload Error

Post by angus »

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/jsaxon/public_html/imagehost/upload.php on line 44
The line is

Code: Select all

$fileOp -> upload_file($_FILES['uploadedfile'], $fileURL, $fileExt, $uploadType);
I can't see anything wrong with that line personally, but can someone see what I can't?

It worked a day ago, and I haven't changed a thing since :\.

Few lines above and below (just incase):

Code: Select all

...
if ($do === null && $exAllowed && $uploadable) {
    if ($fileSize <= 1048576) {
        $fileOp = new fileOps();

        $fileOp -> upload_file($_FILES['uploadedfile'], $fileURL, $fileExt, $uploadType);

        if ($fileExt == "jpg" || $fileExt == "jpeg") {
            $fileThumb = $fileOp -> resize_jpeg ($fileURL, $fileExt, "_thumb");
            $fileNorm = $fileOp -> resize_jpeg ($fileURL, $fileExt, "_normal");
        }
...
Thanks
BadgerC82
Forum Commoner
Posts: 25
Joined: Tue Feb 07, 2006 6:53 am

Post by BadgerC82 »

Hey man...

Im not sure about this but using:

$instanceVariable -> memberFunction();
with a space before -> and after -> instead of
$instanceVariable->memberFunction();

may be causing you an issue there.

Thanks and good luck

Carl Lloyd
angus
Forum Newbie
Posts: 10
Joined: Sat Sep 17, 2005 5:43 pm

Post by angus »

Cheers mate, I just found out what the problem was, in a line (about 10 above that error) I was missing a closing quote in an array declaration.

I ended up taking bits out to find where the error was and found it!


Thanks anyway mate.
Post Reply