KindEditor editor's solution for uploading images that exceed the limit

眼眸间的深情
Release: 2023-04-10 11:32:01
Original
2319 people have browsed it

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. :

KindEditor editors solution for uploading images that exceed the limit

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:

KindEditor editors solution for uploading images that exceed the limit

## 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: KindEditor editors solution for uploading images that exceed the limit

//Maximum file size

<?php
echo phpinfo();
?>
Copy after login

Of course, after modifying this, we do not need to restart the service environment again, and directly try to upload the corresponding file again Pictures can be uploaded!

KindEditor editors solution for uploading images that exceed the limit       

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template