From 4c1f0f659384d71ce28be1fc0343e56e75568fe1 Mon Sep 17 00:00:00 2001
From: chengkun <chengkun@ishangstudy.com>
Date: Tue, 20 May 2025 13:31:22 +0800
Subject: [PATCH] 提交
---
js/ueditor/php/controller.php | 31 ++++++++++++++-----------------
1 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/js/ueditor/php/controller.php b/js/ueditor/php/controller.php
index feac890..088dec7 100644
--- a/js/ueditor/php/controller.php
+++ b/js/ueditor/php/controller.php
@@ -5,42 +5,39 @@
error_reporting(E_ERROR);
header("Content-Type: text/html; charset=utf-8");
-$CONFIG = json_decode(preg_replace("/\/\*[\s\S]+?\*\//", "", file_get_contents("config.json")), true);
+$CONFIG = json_decode(preg_replace("/\/\*[\s\S]+?\*\//", "", file_get_contents("config.json")), TRUE);
$action = $_GET['action'];
switch ($action) {
case 'config':
- $result = json_encode($CONFIG);
+ $result = json_encode($CONFIG);
break;
-
- /* 上传图片 */
+
+ //上传图片
case 'uploadimage':
- /* 上传涂鸦 */
+ //上传涂鸦
case 'uploadscrawl':
- /* 上传视频 */
+ /* 上传视频 */
case 'uploadvideo':
- /* 上传文件 */
+ /* 上传文件 */
case 'uploadfile':
$result = include("action_upload.php");
break;
-
- /* 列出图片 */
+ /* 列出文件 */
+ case 'listfile':
+ /* 列出图片 */
case 'listimage':
$result = include("action_list.php");
break;
- /* 列出文件 */
- case 'listfile':
- $result = include("action_list.php");
- break;
-
+
/* 抓取远程文件 */
case 'catchimage':
$result = include("action_crawler.php");
break;
-
+
default:
$result = json_encode(array(
- 'state'=> '请求地址出错'
+ 'state' => '请求地址出错'
));
break;
}
@@ -51,7 +48,7 @@
echo htmlspecialchars($_GET["callback"]) . '(' . $result . ')';
} else {
echo json_encode(array(
- 'state'=> 'callback参数不合法'
+ 'state' => 'callback参数不合法'
));
}
} else {
--
Gitblit v1.9.0