易截截图软件、单文件、免安装、纯绿色、仅160KB

php特殊字符过滤

php特殊字符过滤
1、过滤标签(HTML):strip_tags()
例如:
<?php
$text = '<?php ?><p>Test paragraph.</p><!-- Comment -
-> <a href=http://topic.csdn.net/u/20090311/09/"#fragment">Other text</a>';
echo strip_tags($text);
echo "\n";
// 允许使用<p>和<a>
echo strip_tags($text, '<p><a>');
?>
2、转义mysql特殊字符:mysql_real_escape_string()
3、引号转义:addslashes()
4、转义HTML:htmlspecialchars()


相关文档:

php 模式修正符

模式修正符 — 解说正则表达式模式中使用的修正符
说明
下面列出了当前在 PCRE 中可能使用的修正符。括号中是这些修正符的内部 PCRE 名。修正符中的空格和换行被忽略,其它字符会导致错误。
 
i (PCRE_CASELESS) 如果设定此修正符,模式中的字符将同时匹配大小写字母。 m(PCRE_MULTILINE) 默认情况下,PCR ......

flash + php 文件上传

 import flash.net.FileFilter;
import flash.net.FileReferenceList;
import fl.controls.Button;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.events.HTTPStatusEvent;
import flash.display.Loader;
import flash.net.URLRequest;
var ......

用php获取本周,上周,本月,上月,本季度日期的代码

用php获取本周,上周,本月,上月,本季度日期的代码,主要用到date,strtotime和mktime函数.
echo date("Ymd",strtotime("now")), "<br />";
echo date("Ymd",strtotime("-1 week Monday")), "<br />";
echo date("Ymd",strtotime("-1 week Sunday")), "<br />";
echo date("Ymd",strtotime("+0 week ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号