12 2012 档案

摘要:1.去除html标记function Text2Html($txt){ $txt = str_replace(""," ",$txt); $txt = str_replace("<","&lt;",$txt); $txt = str_replace(">","&gt;",$txt); $txt = preg_replace("/[\r\n]{1,}/isU","<br/>\r\n",$txt); 阅读全文
posted @ 2012-12-24 13:54 hylaz 阅读(263) 评论(0) 推荐(0)
摘要:1.采集表格中的内容为数组function get_td_array($table) { $table = preg_replace("']*?>'si","",$table); $table = preg_replace("']*?>'si","",$table); $table = pre... 阅读全文
posted @ 2012-12-24 11:35 hylaz 阅读(324) 评论(0) 推荐(0)
摘要:一、使用视图的理由是什么?1.安全性。一般是这样做的:创建一个视图,定义好该视图所操作的数据。之后将用户权限与视图绑定。这样的方式是使用到了一个特性:grant语句可以针对视图进行授予权限。2.查询性能提高。3.有灵活性的功能需求后,需要改动表的结构而导致工作量比较大。那么可以使用虚拟表的形式达到少修改的效果。这是在实际开发中比较有用的。例子:假如因为某种需要,a表与b表需要进行合并起来组成一个新的表c。最后a表与b表都不会存在了。而由于原来程序中编写sql分别是基于a表与b表查询的,这就意味着需要重新编写大量的sql(改成向c表去操作数据)。而通过视图就可以做到不修改。定义两个视图名字还是原 阅读全文
posted @ 2012-12-16 08:49 hylaz 阅读(273) 评论(0) 推荐(0)
摘要:1 class Validationcode{ 2 private $width; 3 private $height; 4 private $codeNum; //输出字符数量 默认是4 5 private $checkCode;//输出的字符 6 private $image; 7 private $type; //字串类型 0 字母 1 数字 4.中文字符 其它 混合 8 private $addChars;// 额外字符 9 //构造函数 10 function __construct($w... 阅读全文
posted @ 2012-12-16 08:47 hylaz 阅读(1157) 评论(0) 推荐(0)
摘要:ECShop 2.6.3 的结构图及各文件相应功能介绍 ECShop2.6.3的目录 ┣ activity.php 活动列表 ┣ affiche.php 广告处理文件 ┣ affiliate.php 生成商品列表 ┣ article.php 文章内容 ┣ article_cat.php文章分类 ┣ auction.php 拍卖前台文件 ┣ brand.php 品牌列表 ┣ captcha.php 生成验证码 ┣ catalog.php 列出所以分类及品牌 ┣ category.php 商品分类 ┣ comment.php 提交用户评论 ┣ compare.php 商品比较程序 ┣ cycle_ 阅读全文
posted @ 2012-12-02 10:26 hylaz 阅读(1492) 评论(1) 推荐(0)
摘要:public void __set(string $name,mixed $value) 在给末定义的变量赋值时,__set()会被调用public mieed __get(string $name) 读取末定义的变量的值时__get会被调用public bool __isset(string na... 阅读全文
posted @ 2012-12-02 10:21 hylaz 阅读(251) 评论(0) 推荐(0)