使用php SimpleImage进行意外的T_STRING

时间:2014-12-30 19:50:16

标签: php

我已经在PHP5.5本地使用SimpleImage并且它工作正常,但我刚刚上传到运行PHP5.4的服务器,SimpleImage支持,我得到:< / p>

PHP Warning:  Unexpected character in input:  '\' (ASCII=92) state=1
PHP Parse error:  syntax error, unexpected T_STRING

对于这一行:

$img = new abeautifulsite\SimpleImage($url);

完整代码:

include 'images/simple.php';

        try {   
            $img = new abeautifulsite\SimpleImage($url);
            $img->auto_orient()->contrast(-10)->colorize('#ff6600', .05)->brightness(5);
            $img->save($new);
        } catch (Exception $e) {
            echo '<div id="fail">'.$e->getMessage().'</div>';
            exit();
        }

0 个答案:

没有答案