Home > CMS Tutorial > PHPCMS > body text

What should I do if the phpcms v9 background cannot upload images?

angryTom
Release: 2020-02-15 13:21:33
Original
2647 people have browsed it

PHPCMS V9 editor cannot upload pictures. When I checked, it uses a second-level domain name. This may be the reason why pictures cannot be uploaded.

What should I do if the phpcms v9 background cannot upload images?

What should I do if the phpcms v9 background cannot upload images?

Cause: When the administrator sets a dedicated management domain name, the background The editor used is still using the editor called by the main domain name, so there is no permission to upload attachments and images.

Solution

Method 1

Do not use a dedicated second-level domain name management background and release permissions. Everything is ok

Method 2

The problem is that a dedicated second-level domain name must be used to manage the backend.

1. Modify system.php In

'app_path' => 'http://www.主域名.com/'  // 下面添加一行
'up_path' => 'http://cp.a.com/',//后台域名配置地址
Copy after login

2. Modify /phpcms/base.php and add the following code

The code is as follows:

//后台CKEditor地址
define('UP_PATH',pc_base::load_config('system','up_path'));  
Copy after login

3. Modify /phpcms/libs/classes/form.class.php

// 原
if($allowupload) 
    $str .= "filebrowserUploadUrl : '".APP_PATH."index.php?m=attachment&c=attachments&a=upload&module=".$module."&catid=".$catid."&dosubmit=1',rn";
Copy after login
// 改
if($allowupload)
     $str .= "filebrowserUploadUrl : '".UP_PATH."index.php?m=attachment&c=attachments&a=upload&module=".$module."&catid=".$catid."&dosubmit=1',rn";
Copy after login

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

The above is the detailed content of What should I do if the phpcms v9 background cannot upload images?. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!