脚本宝典收集整理的这篇文章主要介绍了php – Nicedit本地上传图片失败,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
new nicEdITor({ buttonList : ['bold','italic','underline','upload'],iconsPath:'img/nicedit.png',uploadURI : 'http://server.COM/integracion/files/nicUpload.PHP' }).panelInstance(textareaid);
并且.PHP文件存在(我是Docs中的那个,我更新了目标路径)
/* I want them here http://server.com/integracion/files/uploads/ so... */ define('NICUPLOAD_PATH','./uploads'); // Set the path (relative or absolute) to // the directory to save image files define('NICUPLOAD_URI','/uploads'); // Set the URL (relative or absolute) to // the directory defined above
但是我在上传完成时做出响应(以及从nicedit中提取警告……)
<script> try { top.nicUploadButton.statusCb({"error":"Invalid Upload ID"}); } catch(e) { alert(e.message); } </script>
我错过了什么?
-编辑
$id = $_POST['APC_UPLOAD_PROGRESS']; /* APC is installed and enabled */ if(empty($id)) { $id = $_GET['id']; }
我成功完成了这项工作!
这是一个工作示例:
http://simplestudio.rs/yard/nicedit/
上传的图像将存储在此处:
http://simplestudio.rs/yard/nicedit/images/
这是整个代码,只需将其解压缩并放在您的服务器上,主要是我需要调整nicEdit.js,因为它有一些问题.
http://simplestudio.rs/yard/nicedit/nicedit.rar
只需使用该js文件制作代码,并通过查看我的示例,它将工作:)
>此外,您需要安装PHP APC,以便此脚本可以工作:
http://php.net/manual/en/apc.installation.php
以上是脚本宝典为你收集整理的php – Nicedit本地上传图片失败全部内容,希望文章能够帮你解决php – Nicedit本地上传图片失败所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。