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.
Ïà¹ØÎĵµ£º
¹úÇ쳤¼Ù½«ÖÁ£¬ÕæÊÇ¿ªÐÄ¡£ÕâÁ½ÌìÓеãС¿Õ£¬·ÒëÁËÊÖ²áÖеÄһЩÄÚÈÝ£¬ËãÊǸøPHPerÃǵÄÒ»¸öСÀñÎï¡£
±¾À´Ïë°ÑËùÓÐPHP5.3µÄÐÂÄÚÈݸø¸üÐÂÁË£¬µ«·¢ÏÖÊÖ²áÓкܴóµÄ¸Ä¶¯£¬ÓÈÆäÊÇһЩĿ¼½á¹¹Éϵķ¢¶¯¡£±ØÐëÏȸúÉÏÕâЩ¸Ä¶¯£¬·ñÔò±àÒë»á³ö´í£¬¸ü̸²»ÉϽøÒ»²½µÄ·Òë¡£
ÕâÁ½ÌìÖ÷Òª×öÁËÒÔϹ¤×÷£º
1. ½«·ÒëÆ½Ì¨Ç¨ÒÆµ½SVN
PHP¹Ù·½µÄ ......
3DES£¨¼´Triple DES£©ÊÇDESÏòAES¹ý¶ÉµÄ¶Ô³ÆÐÔ¼ÓÃÜËã·¨£¬ËüʹÓÃ3Ìõ64λµÄÃÜÔ¿¶ÔÊý¾Ý½øÐÐÈý´Î¼ÓÃÜ¡£ÊÇDESµÄÒ»¸ö¸ü°²È«µÄ±äÐΡ£ËüÒÔDESΪ»ù±¾Ä£¿é£¬Í¨¹ý×éºÏ·Ö×é·½·¨Éè¼Æ³ö·Ö×é¼ÓÃÜËã·¨¡£±ÈÆð×î³õµÄDES£¬3DES¸üΪ°²È«¡£
PHPÀûÓÃÀ©Õ¹¿âMcryptÀ´ÊµÏÖDES¼ÓÃÜ£¬ÕâÖÖ¼ÓÃܵĺô¦Ö÷ÒªÊDz»Í¬µÄÓïÑÔÆ½Ì¨Êý¾Ý¿ÉÒÔ½øÐн»»¥¼ÓÃÜ´«Ê䣬·ÀÖ¹ ......
×÷Õß ³ÂºÆ £¨Haohappy£©
MSN: haohappy # php.net
2009-08-13
±¾ÎÄ¿¯ÓÚ¡¶³ÌÐòÔ±¡·ÔÓÖ¾ 2009.09
×ªÔØÇë×¢Ã÷×÷Õß¼°³ö´¦
ºÁÎÞÒÉÎÊ£¬Èç½ñPHPÒѾ³ÉΪWEB¿ª·½µ±ÖÐ×îÈÈÃŵļ¼ÊõÖ®Ò»¡£¸ù¾Ýnexen.netµÄµ÷²é£¬»¥ÁªÍøÉÏÈý·ÖÖ®Ò»µÄÍøÕ¾Ñ¡ÔñPHPÀ´¿ª·¢·þÎñÆ÷¶Ë³ÌÐò¡£ÔÚÅ·ÃÀºÍÈÕ±¾µÈ¹ú¼Ò£¬PHP¿ª·¢Êг¡³ÊÏÖ³öһƬÐÀÐ ......
php ¹ºÎﳵʵÀý
<?php
/**
php ¹ºÎﳵʵÀý
ÍøÉÏËѵ½µÄ£¬¼òµ¥ÈÝÒ×Àí½â¡£cookie´æ¹ºÎï³µID£¬db´æ¹ºÎï³µÊý¾Ý¡£ ¹ºÎï³µsessionµÄ²úÉú´úÂë
*/
if(! $session && ! $scid) {
/*
sessionÓÃÀ´Çø±ðÿһ¸ö¹ºÎï³µ£¬Ï൱ÓÚÿ¸ö³µµÄÉí·ÝÖ¤ºÅ£»
scidÖ»ÓÃÀ´±êʶһ¸ö¹ºÎï³µidºÅ£¬¿ÉÒÔ¿´×öÊÇÿ¸ö³µµÄÃû×Ö£»
......
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();
$ ......