Today I would like to share with you a problem I encountered when using plug-ins and related solutions during the development of front-end plug-in projects. Of course, this main problem is still related to PHP. You can learn about it to facilitate the development of projects later. When you encounter similar problems, you can deal with them in a timely and effective manner. Below I will start to explain the steps to solve the problem of uploading images exceeding the limit in my KindEditor editor:
I believe that friends who have developed projects should not be familiar with the front-end plug-in KindEditor. I'm unfamiliar with it. It can help me quickly edit and publish articles, but I encountered this problem when I used it today:
When using the KindEditor editor to upload larger images, an error will appear as shown below. :
As shown in the picture, the error: exceeds the size allowed by php.ini. For such problems, you need to change the upload_max_filesize = 2M limit in the php.ini file to a larger size. That's it. Of course, friends who don't know php.ini can directly search for the php.ini file in the environment installation file, or run the phpinfo.php file directly in the root directory of the website:
phpinfo.php file content ; You will know where it is, modify the corresponding size limit, and pay attention to restarting the environment!
I originally thought that this would solve the problem, but when I ran the project, an error message appeared again:
## The uploaded file size exceeded the limit. The restriction has been lifted, so I really think there is only one. I focused my attention on the KindEditor editor, and finally found that the KindEditor editor itself has a limit on the upload file size. At this time, we need to modify the php in the directory that introduces the KindEditor editor. The upload_json.php file under the file also has a corresponding upload size limit. The error reported pops up in this file, as shown below:We only need to modify it The size of $max_size in this file can be:
//Maximum file size<?php echo phpinfo(); ?>
The above is the detailed content of KindEditor editor's solution for uploading images that exceed the limit. For more information, please follow other related articles on the PHP Chinese website!