0
爲TinyMCE的上傳圖片(justboil.com)在TinyMCE插件上傳我使用的插件圖像
我對
sub.domain.com/upload.php
上傳圖片和上傳文件夾位於
domain.com/file_dump/tinymce_file_upload
我已經在我的配置把這個
$config['img_path'] = '/file_dump/tinymce_file_upload'; // Relative to domain name
$config['upload_path'] = substr($_SERVER['DOCUMENT_ROOT'],0,-3) . $config['img_path']; // Physical path. [Usually works fine like this]
它得到DOCUMENT_ROOT
並刪除3個字符(對於子域)作爲子域位於public_html
文件夾
我收到一個錯誤說上傳路徑中的子文件夾是無效的,當我嘗試上傳圖片
你能迴應'substr($ _ SERVER ['DOCUMENT_ROOT'],0,-3)'嗎?這是什麼意思? – cmorrissey
它顯示home/username/public_html,其中$ _SERVER [「DOCUMENT_ROOT」]將是home/username/public_html/sub – user2710234
您需要在前面加上'/' – cmorrissey