我在我的Zend-Framework應用程序內使用PhpThumbFactory-library。它似乎執行(!?)生成的圖像文件爲PHP。奇怪的失敗與「PhpThumbFactory」
錯誤:
[07-Mar-2011 11:20:20] PHP Warning: Unexpected character in input: '' (ASCII=16) state=0 in path\uploads\thumbs\3.jpg on line 52
[07-Mar-2011 11:20:20] PHP Parse error: syntax error, unexpected ']' inpath\uploads\thumbs\3.jpg on line 52
來源:
require_once APPLICATION_PATH . "/../library/ThumbLib.inc.php";
try
{
$thumb = PhpThumbFactory::create(APPLICATION_PATH . '/../uploads/' . $result . '.jpg', array("correctPermissions"=>true));
$thumb->resize(240, 200);
$thumb->save(APPLICATION_PATH . '/../uploads/thumbs/' . $result . '.jpg');
} catch (Exception $e)
{
var_dump($e);
}
我真的很好奇。 :/
52是什麼? – Shoe 2011-03-07 10:37:36
它是指JPG - 該行不存在的代碼。不知何故庫似乎執行.jpg的內容... – 2011-03-07 12:11:00