要使您的FCKeditor能够使用上传功能,您必须进行以下配制。
注意:FCKeditor不支持虚拟目录,您的路径设置都是针对网站根目录的绝对路径而言的。这点对于发布到远程网站目录的开发者极为不便,后面我们会对此进行讨论。
一、打开fckeditor\editor\filemanager\upload\php\config.php,找到代码$Config['Enabled'],将值设置为true。
二、接下来几行,设置$Config['UserFilesPath'],设置上传路径。
三、打开fckeditor\fckconfig.js文件,找到代码_FileBrowserLanguage,将值设置为php。接下来一行,把_QuickUploadLanguage值也设置为php。
配置文件浏览
一、打开fckeditor\editor\filemanager\browser\default\connectors\php\config.php
找到代码$Config['Enabled'],将值设置为true;
二、接下来几行,设置$Config['UserFilesPath'],设置浏览路径。
关于上传\文件浏览安全性问题
为了解决FCKeditor不支持虚拟目录问题,和FCKeditor文件上传的安全性考良。我们有必要在这里单论对此进行讨论。
打开fckeditor\editor\filemanager\upload\php\config.php,找到$Config['UserFilesPath']代码,在此行代码之前定义变量$root_p ......
一般情况下,在开发环境中访问一个具体商品的URL是这样的:
http://localhost/phptest/show.php?id=1
但是我需要更改一下URL,对搜索引擎更友好,如:
http://localhost/phptest/1.html
这只是举例罢了。
下面我们来看看,这两天链接最后达到的效果是一样的,请注意浏览器地址!
1、正常访问:
2、伪静态后:
接下来我们进行具体的配置:
1、打开 Apache 的配置文件 httpd.conf;
2、将#LoadModule rewrite_module modules/mod_rewrite前面的#去掉;
3、在 httpd.conf中添加:
<VirtualHost *:80>
RewriteEngine on
RewriteRule /phptest/([0-9]+).html /phptest/show.php?id=$1 [PT]
</VirtualHost>
配置意思很明显,一看就懂了。
如果需要更详细的配置,请参考以下链接,这里主要是让你简单体验一下效果:
URL重写指南 http://man.chinaunix.net/newsoft/ApacheManual/misc/rewriteguide.html
正则表达式30分钟入门教程http://unibetter.com/deerchao/zhengzhe-biaodashi-jiaocheng-se.htm ......
来源:蓝色理想 作者:Dreamer 2007年10月16日 14:50 网友评论:0条 点击:
2737
Dreamer的Blog:www.zhuoqun.net/
英文原文:Creating MyTube with Flex and PHP
原文地址:
http://www.onlamp.com/pub/a/php/2007/05/24/creating-mytube-with-flex-and-php.html
原文作者:Jack Herrington
随着宽带的普及、硬盘空间的价格持续降低以及Adobe® Flash® Player 和 Flash Video的实用性,视频分享在互联网上疯狂流行是不足为奇的。像Google video 和 YouTube 这样的站点是领头羊,而现在已经到处都是小型的视频分享站点了。那么,如何才能加入到潮流中去呢?如何利用像PHP, Flash和Adobe Flex™ 等技术来创建自己的视频分享网站?行动起来吧,它比你想象的要容易得多。
本文将告诉你如何创建网站的PHP部分以及如何使用Flex框架创建一个视频播放器。要创建一个YouTube的简单版本(我们可以称它为MyTube),你需要有一些适当的工具。
在服务器端,你需要PHP 和 MySQL。MySQL是用来存储有关视频的数据的(比如视频的文件名,缩略图,缩略图的高度和宽度,标题和描述)。PHP将完成格式化页面的工作,包括HTML和XML页面,这取决于你想要怎么做。
你还需 ......
If you want to put some big table in the pdf file, you may got the layout messy. One way to solve the problem is to change the paper size. In "includes/cpdf_adapter.cls.php", Change the size you used in the array to whatever you want.
One tip: Replace Url into Clickable link.
$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href="\" mce_href="\""\\0\" rel=\"nofollow\">\\0</a>", $text);
It may look like gibberish at first, but if you look at it for awhile, you might be able to guess what it does.
Suppose you’re writing a PHP script that displays data, let’s use
blog comments as an example. Sometimes the data being displayed may
have a URL pasted into it by the user that submitted it. Wouldn’t it be
nicer for the end user if URLs like that were automatically turned into
clickable links, so “http://google.com” would become “http:/ ......
/*
>>> Title : Ewebeditor编辑器嵌入到PHP网页中
>>> Author: 刘晨晖
>>> Date : 2009-07-05
>>> EMAIL :
huichengongzi@gmail.com
>>> 转载请注明出处,谢谢合作!
*/
(1)在
</head>
之前加上下面一段代码:(得到
ewebeditor
中编辑的内容)
<script>
function checkForm()
{
document.form1.content
.value
= window.ewebeditor
.getHTML();
************getHTML()
获得编辑区内容
************
此处的名字
ewebeditor
要与
iframe
中的
name="ewebeditor"
相同
************content.value
也要与
content
中的
<input >
中相对应
}
</script>
( ......
/*
>>> Author: 刘晨晖
>>> Date : 2009-07-05
>>> EMAIL :
huichengongzi@gmail.com
>>> 转载请注明出处,谢谢合作!
*/
配置php.ini文件 (以上传500M以下大小的文件为例)
查找以下选项并修改->
file_uploads = On ;打开文件上传选项
upload_max_filesize = 500M ;上传文件上限
如果要上传比较大的文件,仅仅以上两条还不够,必须把服务器缓存上限调大,把脚本最大执行时间变长
post_max_size = 500M ;post上限
max_execution_time = 1800 ; Maximum execution time of each script, in seconds脚本最大执行时间
max_input_time = 1800 ; Maximum amount of time each script may spend parsing ......