search
HomeCMS TutorialPHPCMSWhat 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?

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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SecLists

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

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

DVWA

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

Dreamweaver Mac version

Visual web development tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools