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?
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/',//后台域名配置地址
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'));
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";
// 改 if($allowupload) $str .= "filebrowserUploadUrl : '".UP_PATH."index.php?m=attachment&c=attachments&a=upload&module=".$module."&catid=".$catid."&dosubmit=1',rn";
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!