php 替换非法字符 保存到数据库
function _processBeforeDb($str)
{
$str = str_replace ( array ('<', '>' ), array ('<' , '>' ), $str );
if (!get_magic_quotes_runtime()){
return addslashes($str);
}
else
{
return $str;
}
}
相关文档:
创建文档类型声明
一般而言,XML声明放在文档顶部。在PHP中声明十分简单:只需实例化一个DOM文档类的对象并赋予它一个版本号。查看程序清单A:
程序清单 A
<?php
// create doctype
$dom = new DOMDocument("1.0");
// display document in browser as plain text
// display document in browser as plain text ......
1 代理(Proxy)和委派(Delegate)的区别
http://hi.baidu.com/thinkinginlamp/blog/item/2297a7efcb52a31afdfa3cc2.html
2 开心农场架构介绍
http://www.javaeye.com/wiki/facebook/1766-five-minutes-happy-farm-structure-introduced
http://www.w2blog.net/view/455.html
3 SmugMug 的架构介绍
http://www.w2blo ......
<?php
function myFun(){
echo "hello,张三";
}
//利用function_exists方法判断自动以方法是否存在
//该方法参数为要判断的自定义方法的方法名,可写为
//"myFun"或myFun
if(function_exists(myFun)){
echo "存在 ......
使用过SQL Server的人应该都清楚,SQL Server常用的有两种认证方式,一种是本地系统账户认证(Windows Authentication ),一种是使用用户名和密码(SQL Server Authentication ),第二种认证方式必须启用SQL Server的混合模式。
1.Windows Authentication连接部分代码段:
<?php
$serverName = "(local)";
$co ......
sink按:今天是周末所以看了下书。因为我一直认为无论多忙,无论忙什么,每个周应该给自己一个有阳光的下午,带上一杯饮品,看着杂志或者著作。看的是《程序员2009精华本》,惊奇的发现PHP5.3已经出现,而那篇文章写得很好,故网上搜索了下并转载过来。
毫无疑问,如今PHP已经成为WEB开方当中最热门的技术之一。根据nexen. ......