yipeiwu_com6年前
基本的工厂类 复制代码 代码如下: class MyObject{ //对象将从工厂返回 } class MyFactory{ public static function factor...
yipeiwu_com6年前
1.php中用smarty模板生成的html在浏览器中顶部有一空行. 2.用firedebug发现 meta和link标记在body标签里. 本机上wmap运行没事, 送到远程服务器上是...
yipeiwu_com6年前
一、介绍 UTF-8 是一种在web应用中经常使用的一种 Unicode 字符的编码方式,使用 UTF-8 的好处在于它是一种变长的编码方式,对于 ANSII 码编码长度为1个字节,这样...
yipeiwu_com6年前
写入过程 复制代码 代码如下: // Get the path of the configuration file $fname = JPATH_CONFIGURATION.DS.'co...
yipeiwu_com6年前
1.不转意html entities 一个基本的常识:所有不可信任的输入(特别是用户从form中提交的数据) ,输出之前都要转意。 echo $_GET['usename'] ; 这个例...
yipeiwu_com6年前
复制代码 代码如下: function makeClickableLinks($text) { $text = eregi_replace('(((f|ht){1}tp://)[-a-z...
yipeiwu_com6年前
复制代码 代码如下: /********************** *@filename - path to the image *@tmpname - temporary path...
yipeiwu_com6年前
复制代码 代码如下: /******************** *@file - path to file */ function force_download($file) { if...
yipeiwu_com6年前
复制代码 代码如下: function getCloud( $data = array(), $minFontSize = 12, $maxFontSize = 30 ) { $mini...
yipeiwu_com6年前
复制代码 代码如下: if (!preg_match("/^(http|ftp):/", $_POST['url'])) { $_POST['url'] = 'http://'.$_PO...