isadmin = $this->admin_username = $_SESSION[]"."/> isadmin = $this->admin_username = $_SESSION[]".">

Home  >  Article  >  CMS Tutorial  >  What should I do if pictures cannot be inserted into articles submitted to phpcms?

What should I do if pictures cannot be inserted into articles submitted to phpcms?

藏色散人
藏色散人Original
2020-02-04 11:44:302735browse

What should I do if pictures cannot be inserted into articles submitted to phpcms?

Can't insert pictures into articles submitted by phpcms? Phpcms v9 front-end user contribution page editor cannot upload pictures?

This is because there is no permission to upload images in the background to the front desk. The administrator must log in to the background before the front desk can upload things.

So if you need to insert an image to upload in the front-end user submission editor, you have to remove the permissions and modify:

Find the phpcms/modules/attachments/attachments.php line 18:

$this->isadmin = $this->admin_username = $_SESSION['roleid'] ? 1 : 0;

Change to:

$this->isadmin = $this->admin_username = $_SESSION['roleid'] ? 1 : 1;

Update cache, that’s it!

PHP Chinese website, a large number of free PHPCMS tutorials, welcome to learn online!

The above is the detailed content of What should I do if pictures cannot be inserted into articles submitted to phpcms?. For more information, please follow other related articles on the PHP Chinese website!

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