php加载图片失败的原因

时间:2013-12-04 17:24:32

标签: php image load

我试图在网站上加载图片,但此代码仅适用于小于100k的图片,当我尝试加载256k或更少的图片时此检查失败

$formato=array("jpg","gif","png");

$info = pathinfo( $_FILES["img_c"]["name"], PATHINFO_EXTENSION );

if ( ( $_FILES["img_c"]["type"] == "image/jpg" || $_FILES["img_c"]["type"] =="image/gif" || $_FILES["img_c"]["type"] == "image/png"  )& $_FILES["img_c"]["size"] < 256000 && in_array( $info, $formato ) ) 

0 个答案:

没有答案