浏览模式: 标准 | 列表2008年01月的文章

SPAW Editor 一款支持PHP的编辑器

一个免费开源的项目。有asp.net , php 2个版本 自带上传功能  。大小: 18.88 K
尺寸: 500 x 125
浏览: 27 次
点击打开新窗口浏览全图

SPAW Editor 2. 特点介绍:

  1. 支持tab功能,意味着一个编辑器可以同时编辑好几个文档。越来越像常用的编辑器了,哈哈。
  2. 浮动的工具栏,想怎么拖就怎么拖。
  3. 窗口任意缩放……没有想法了
  4. 含有API接口,可以方便的进行二次开发。
  5. 支持 Opera, Safari, Firefox, Mozilla, Netscape 等等,还有更多吗?
  6. 可以方便更换主题。
  7. 文档管理器,任意上传。
  8. 多语言支持,当然有我们可爱的母语中文咯。

这么强大的编辑器,也就区区三四百kb,精简一下应该更令人兴奋。

使用方法:

开头插入

PHP代码
  1. <?php   
  2. include(”../spaw.inc.php”);   
  3. ?>  

需要编辑器的地方插入,其中spaw1就是你表单的标识,如果是编辑就再加入一个内容的函数

PHP代码
  1. <?php   
  2.   $spaw1 = new SpawEditor(”spaw1″);   
  3.   $spaw1->show();   
  4. ?>  

就这么简单。配置文件在 config 目录中,具体的设置查自带的文档吧

php版本:  http://sourceforge.net/project/showfiles.php?group_id=77954&package_id=78981&release_id=523489

ASP.Net版本: http://sourceforge.net/project/showfiles.php?group_id=77954&package_id=92584&release_id=543187

Tags: editor, wysiwyg

.htaccess 问题

摸索codeigniter。一开始就遇到了挫折。

按官方的提示,我想把RUL中的index.php隐藏掉。原来的URL是“www.your-site.com/index.php/news/article/my_article

通过设置.htaccess文件可以掩藏它。使用“非”(!)方法使指定以外的任何请求都重新定向。

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

在上面的例子中,任何除开 index.php,images,和robots.txt 的 HTTP 请求都当成对 index.php 文件的请求。

淡水照做了。但是给我的结果是:

Forbidden

You don't have permission to access /main on this server.


Apache/2.0.59 (Win32) DAV/2 PHP/5.2.3 Server at localhost Port 80

 

本以为是权限的问题,其实不是,而是由于Server的httpd.conf中将FollowSymLinks禁止了,也就是禁止了符号链接。来看看Apache Document中对FollowSymLinks的定义:

XML/HTML代码
  1. FollowSymLinks   
  2. The server will follow symbolic links in this directory.    
  3. Even though the server follows the symlink it does not change the pathname used to match against <Directory> sections.   
  4. Note also, that this option gets ignored if set inside a <Location> section.  

因此,我们需要在.htaccess中进行设定:Options FollowSymLinks

再试。ok。

全部的.htaccess文件如下:

XML/HTML代码
  1. RewriteEngine on   
  2. Options FollowSymLinks   
  3. RewriteCond $1 !^(index\.php|images|robots\.txt)   
  4. RewriteRule ^(.*)$ /index.php/$1 [L]  

Tags: .htaccess, codeigniter

简单的单入口MVC的实现

还是从咕噜咕噜搬来的.

» 阅读全文

Tags: mvc

通过php缓存你的页面

就是上一篇文章的来源了.

» 阅读全文

Tags: 缓存

PHP一个小巧的缓存类

Tags: 缓存

Code Igniter 方法备忘

元旦过了,该收心了。学习

» 阅读全文

Tags: code igniter

Records:1612