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

php 正则表达式 html中的回车

//回车:[\n\r\t]
$reg="|typeid=\"(.*)\" onsel.*[\n\r\t]*<a href="\" mce_href="\""#\">(.*)</a>|";
preg_match_all ($reg,
$html,
$out, PREG_PATTERN_ORDER);
foreach ($out as $value){
foreach ($value as $value2){
if(strlen($value2)<20)
echo ($value2."<br>");
}
}
//ikmb


相关文档:

php Mod rewrite test

In the directory where you plan to install Elgg, do the following:
Create the file .htaccess and add these two lines
RewriteEngine on
RewriteRule ^testing.php$ modrewrite.php
This tells the webserver to load modrewrite.php when testing.php is
requested.
In order to get this test to work on ......

[转]PHP中str_replace函数的详解


在实际的程序开发中,执行字符串替换操作是一件非常经常的事,对
str_replace
函数的实用也会非常频繁。
     
这段时间在看《
PHP

MySQL Web
开发》一书看到
str_replace
讲解,一段小提示写到:可以为
str_replace
的三个都使用数组传入,但讲解比较简单,于是决定自己的试验 ......

PHP+DOM创建XML文件

创建文档类型声明
一般而言,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 ......

PHP 正则表达式查找字符串

<?php
set_time_limit(0);
$url='http://item.taobao.com/auction/item_detail.htm?xid=0db2&item_num_id=4512430274&cm_cat=50000671&pm2=1';
$ch = curl_init();
$timeout = 10;
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CU ......

php之造车论

现在php有很多开发框架,比如zend的zendframe——一个效率很低,但威力很大的巨人,symfony——一个适用大型应用却体积轻巧的帮手,cakephp,codelgniter,thinkphp,fleaPHP等等优秀作品。
也许因为这个原因,php很难成为主流。选择多了反而不知道选择哪个好。不像java有统一的主流框架,你可以选择e ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号