我在UeditorController.php中打印dump($config),
$config是事外配置好的
$config = [
"savePath" => $strSavePath, //保存路径
"allowFiles" => $allowedExts,// [".gif", ".png", ".jpg", ".jpeg", ".bmp"], //文件允许格式
"maxSize" => $uploadMaxFileSize //文件大小限制,单位KB
];
但是我打印出来是下面这样的,自动有个<pre></pre>而且中是有可多=>,这是为什么?
<pre>array(3) {
["savePath"] => string(53) "/www/wwwroot/www.chunten.com/public/ueditor/20230809/"
["allowFiles"] => array(5) {
[0] => string(3) "jpg"
[1] => string(4) "jpeg"
[2] => string(3) "png"
[3] => string(3) "gif"
[4] => string(4) "bmp4"
}
["maxSize"] => string(5) "20480"
}
</pre>
因为<pre></pre> 标签和 =>输出被转成 HTML了,用下面的方法试试:
或者: