Solutions
source/class/discuz/discuz_upload.php
Edit this file to
Because the program limits the large size (refers to the resolution) attachment picture, the prompt "No legal file is uploaded"
How to change: sourceclassdiscuzclass_upload.php
Found it:
| The code is as follows |
Copy Code |
| function Get_image_info ($target, $allowswf = False) { $ext = Discuz_upload::fileext ($target); $isimage = Discuz_upload::is_image_ext ($ext); if (! $isimage && ($ext!= ' swf ' | |! $allowswf)) { return false; } elseif (!is_readable ($target)) { return false; } elseif ($imageinfo = @getimagesize ($target)) { List ($width, $height, $type) =!empty ($imageinfo)? $imageinfo: Array (', ', ', '); $size = $width * $height; if ($size > 16777216 | | $size < 16) { return false; } elseif ($ext = = ' swf ' && $type!= 4 && $type!= 13) { return false; } elseif ($isimage &&!in_array ($type, Array (1,2,3,6,13))) { return false; } return $imageinfo; } else { return false; } } |
The problem can be solved by changing 16777216 in the IF ($size > 16777216 | | $size < 16).
16777216 is about 5000*3356.
16777216 change the big can.
Error:500 's mistake.
The solution is to edit the php.ini file
Will
Memory_limit set larger, until the picture can be uploaded smoothly.
If it is a virtual host user, do not have the right to modify the php.ini file, please contact service provider to resolve, if the service provider does not resolve, consider turning off the image of the function of abbreviations.