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

Dompdf for PHP & Replace Url to link

If you want to put some big table in the pdf file, you may got the layout messy. One way to solve the problem is to change the paper size.  In "includes/cpdf_adapter.cls.php", Change the size you used in the array to whatever you want.
One tip: Replace Url into Clickable link.
$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href="\" mce_href="\""\\0\" rel=\"nofollow\">\\0</a>", $text);
It may look like gibberish at first, but if you look at it for awhile, you might be able to guess what it does.
Suppose you’re writing a PHP script that displays data, let’s use
blog comments as an example. Sometimes the data being displayed may
have a URL pasted into it by the user that submitted it. Wouldn’t it be
nicer for the end user if URLs like that were automatically turned into
clickable links, so “http://google.com” would become “http://google.com
?”
That’s exactly what this line of PHP code does. It takes the variable $text
and parses through it, converting stray URLs into clickable links.


相关文档:

PHP手册翻译日记 [6] 若干结构改变

国庆长假将至,真是开心。这两天有点小空,翻译了手册中的一些内容,算是给PHPer们的一个小礼物。
本来想把所有PHP5.3的新内容给更新了,但发现手册有很大的改动,尤其是一些目录结构上的发动。必须先跟上这些改动,否则编译会出错,更谈不上进一步的翻译。
这两天主要做了以下工作:
1. 将翻译平台迁移到SVN
PHP官方的 ......

PHP网站开发过程中注意这些安全知识

1、古老的欺骗SQL语句
在默认模式下,即使是你忘了把php.ini拷到/usr/local/lib/php.ini下,php还是打开magic_quotes_gpc=on。
这样所有从GET/POST/Cookie来的变量的单引号(')、双引号(")、反斜杠backslash(\)以及空字元NUL
(the null byte)都会被加上反斜杠,以使数据库能够正确查询。
但是在php-4-RC2的时候引入 ......

PHP5面向对象:Object Cloning

PHP4:
<?
$sample1 = new StdClass();
$sample1->name = "Hasin";
$sample2 = $sample1;
$sample2->name = "Afif";
echo $sample1->name;
?>
In PHP4 it works differently; it will output Hasin, as both are different from 
each other.
PHP5:
<?
$sample1 = new StdClass();
$ ......

PHP程序61条面向对象分析设计的经验原则 (转)

 
你不必严格遵守这些原则,违背它们也不会被处以宗教刑罚。但你应当把这些原则看成警铃,若违背了其中的一条,那么警铃就会响起 。 ----- Arthur J.Riel
 
(1)所有数据都应该隐藏在所在的类的内部。
 
(2)类的使用者必须依赖类的共有接口,但类不能依赖它的使用者。
 
(3)尽量减少类的协议中的 ......

使用Flex和PHP创建自己的视频应用


来源:蓝色理想 作者:Dreamer 2007年10月16日 14:50 网友评论:0条 点击:
2737
Dreamer的Blog:www.zhuoqun.net/
英文原文:Creating MyTube with Flex and PHP
原文地址:
http://www.onlamp.com/pub/a/php/2007/05/24/creating-mytube-with-flex-and-php.html
原文作者:Jack Herrington
随着宽带的普及、 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号