What should I do if the phpcms v9 background cannot upload images?
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Dreamweaver Mac version
Visual web development tools

Dreamweaver CS6
Visual web development tools