I'm making a little project for somebody. Now i'm new to messing with files in php but i managed to get it to run on localhost using Mamp. Anyway, now i wanted to upload a test version online and when i'm trying to login i get the following error:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/fcom2126/public_html/bael/admin/overview.php on line 59
I have no idea what this error means, by searching around it could be a $ missing somewhere but i can't see where. Maybe you guys can help me out?
if (!in_array((new SplFileInfo($_FILES['afbeelding']['name']))->getExtension(), array('jpeg', 'jpg', 'png', 'gif'))) {
exit('<p>Foute extentie. Enkel afbeeldingen toegelaten!</p>');
} else {
$path_parts = pathinfo($_FILES['afbeelding']['name']);
$_FILES['afbeelding']['name'] = $name . "." . $path_parts['extension'];
//!!! aanpassen bij UPLOAD
$img = $_SERVER['DOCUMENT_ROOT'] ."/img/rouwregister/overledenen/". $_FILES['afbeelding']['name'];
}
The if sentence is line 59, on my localhost i don't get any error but when trying it out on the web it does give me an error.
Where is my fault? Thanks beforehand
Pieter-Jan
EDIT
Could it be that SPL isn't supported in my php version yet?