FCK在UNIX下出错

jim8590251 2010-04-20 08:49:59
我在本地做的网站,PHP+MYSQL,本地是windows2003,做好后买的空间
是UNIX操作系统
发现上传后,不少地方出错,特别是 FCK,在本地调用的时候都是对的
本地调用FCK代码:
include("../FCKeditor/fckeditor.php") ;//引用编辑器文件
$oFCKeditor = new FCKeditor('FCKeditor1') ; //实例化对象
$oFCKeditor->BasePath = '../FCKeditor/' ; //定义路径
$oFCKeditor->ToolbarSet = 'Basic' ; //编辑器功能选择
$oFCKeditor->InstanceName = 'news_content' ; //编辑器名称,保存数据的变量
$oFCKeditor->Width = '100%' ; //编辑器宽度
$oFCKeditor->Height = '450' ; //编辑器高度
$oFCKeditor->Value = $rs[0]["news_content"] ;//编辑器默认值
$oFCKeditor->Create() ;//创建编辑器

但在unix下显示include包含文件找不到,请问如何修改?
...全文
77 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
mu_rain 2010-04-20
  • 打赏
  • 举报
回复
用 include($_SERVER['document_root']."\FCKeditor\fckeditor.php"); 试试,先找到fck 编辑器的代码再说。

应该在调用之前先定义ROOT 根路径变量为宜
define(ROOT,$_SERVER['document_root']);
餅餅 2010-04-20
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 jim8590251 的回复:]
是买的空间,没办法改权限啊 !~
FCK那行提示错误:

PHP code

Warning: include(..\FCKeditor\fckeditor.php) [function.include]: failed to open stream: No such file or directory in /vhost/vhostroot/masseypr67/www/manage/……
[/Quote]
include("../FCKeditor/fckeditor.php") ;//Class 'FCKeditor' not found 路径问题 用绝对路径试下 还有我记得这个fck放的路径不能太深 好像超过两层就有bug
jim8590251 2010-04-20
  • 打赏
  • 举报
回复
发现其他还有好多 地方都是 包含文件找不到
估计跟FCK没有什么关系
jim8590251 2010-04-20
  • 打赏
  • 举报
回复
是买的空间,没办法改权限啊 !~
FCK那行提示错误:

Warning: include(..\FCKeditor\fckeditor.php) [function.include]: failed to open stream: No such file or directory in /vhost/vhostroot/masseypr67/www/manage/temp/newscontent.htm on line 39

Warning: include() [function.include]: Failed opening '..\FCKeditor\fckeditor.php' for inclusion (include_path='.:/vhost/vhostroot/masseypr67/www/') in /vhost/vhostroot/masseypr67/www/manage/temp/newscontent.htm on line 39

Fatal error: Class 'FCKeditor' not found in /vhost/vhostroot/masseypr67/www/manage/temp/newscontent.htm on line 40
thinkinginAOCP 2010-04-20
  • 打赏
  • 举报
回复
是不是fck要生成缓存文件,而缓存目录由于没有设置写权限,无法生成缓存文件,所以报错,
可能include的文件无权限生成,LZ,查查...

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧