PHP FCKeditor2.5 解决上传图片问题
主要分为3步:
第一步:设置FCKeditor/fckconfig.js
1.
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php
2.
FCKConfig.ImageBrowser = false ;//关闭服务器浏览功能
第二步:设置三个config.php
1. FCKeditor/editor/filemanager/upload/config.php
$Config['Enabled'] = true ;//是否启用
$Config['UserFilesPath'] = '/html/FCKeditor/upload/' ;//相对根目录的路径
$Config['UserFilesAbsolutePath'] = 'F:\\AppServ\\www\\myreach\\wwwroot\\html\\FCKeditor\\upload\\' ;//绝对路径
2. FCKeditor/editor/filemanager/browser/default/connectors/php/config.php
$Config['Enabled'] = true ;//是否启用
$Config['UserFilesPath'] = '/html/FCKeditor/upload/' ;//相对根目录的路径
$Config['UserFilesAbsolutePath'] = 'F:\\AppServ\\www\\myreach\\wwwroot\\html\\FCKeditor\\upload\\' ;//绝对路径
3. FCKeditor/editor/filemanager/connectors/php/config.php
$Config['Enabled'] = true ;//是否启用
$Config['UserFilesPath'] = '/html/FCKeditor/upload/' ;//相对根目录的路径
$Config['UserFilesAbsolutePath'] = 'F:\\AppServ\\www\\myreach\\wwwroot\\html\\FCKeditor\\upload\\' ;//绝对路径
第三步:建立相应的文件夹,并设置属性为可写
好了,这样强大的在线上传功能就实现了,是不是很酷呢?
哦对了,最后别忘了,找到FCKeditor/editor/filemanager/dialog/fck_image/fck_image_preview.html里面把里面那一大段E文删掉哦
相关文档:
初学PHP的时候,我们经常被PHP的绝对路径和相对路径弄的晕头转向。路径问题经常导致include及require命令不能加载到指定的页
面,从而导致Web程序运行错误。本文将跟大家一起探讨一下PHP路径问题的常用解决方案。
下面我们先做一个个简单的示例:
上图是一个简单Web项目的结构图,其中各文件的代码如下: ......
任务:根据输入的域名 统计以下三个数据,第一:全球排名;第二:用户量(月平均值);第三:
人均页面访问量(月平均值)。
思路:使用get_file_contents提取出网页内容,再根据正则表达式进行内容的筛选。
核心函数如下:
<?php
/*
the function of getting aleax data
@param string partten  ......
apache:
如果采用RPM包安装,安装路径应在 /etc/httpd目录下
apache配置文件:/etc/httpd/conf/httpd.conf
Apache模块路径:/usr/sbin/apachectl
web目录:/var/www/html
如果采用源代码安装,一般默认安装在/usr/local/apache2目录下
php:
如果采用RPM包安装,安装路径应在 /etc/目录下
php的配置文件:/etc/php.ini
......
/ ok
header('HTTP/1.1 200 OK');
//设置一个404头:
header('HTTP/1.1 404 Not Found');
//设置地址被永久的重定向
header('HTTP/1.1 301 Moved Permanently');
//转到一个新地址
header('Location: http://www.example.org/'
);
//文件延迟转向:
header('Refresh: 10; url=http://www.example.org/');
print 'Y ......
#
启动服务的用户和组
user
lighttpd lighttpd;
#
开多少进程
worker_processes
2;
#
错误日志
error_log
/data/log/nginx/nginx_error/nginx_error.log crit;
#
pid
pid
/var/run/nginx.pid;
#
Specifies
the value for maximum file descriptors t ......