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.
相关文档:
仿GOOGLE和Discuz分页函数(php)
这个函数只需要2个参数 当前页码和总页数,$site是路径,文件名可以按自己的需要修改
这个函数不能传递其他参数,如果要传递其他参数,在函数里自己加一个参数就行了
<?php
//计数
$sql = “SELECT count(*) from `andycms_title`;”;
$numrs = mysql_query($sql) or ......
国庆长假将至,真是开心。这两天有点小空,翻译了手册中的一些内容,算是给PHPer们的一个小礼物。
本来想把所有PHP5.3的新内容给更新了,但发现手册有很大的改动,尤其是一些目录结构上的发动。必须先跟上这些改动,否则编译会出错,更谈不上进一步的翻译。
这两天主要做了以下工作:
1. 将翻译平台迁移到SVN
PHP官方的 ......
1、PHP4以后获取传值的方法
一般在页面中传值常见的是POST、GET和COOKIE几种,所以下面我也主要介绍这几种。PHP4以后都采用的是$_POST、$_GET等数组来获取网页传值。在PHP3.0及以下版本都是用的是$HTTP_POST_VARS、$HTTP_GET_VARS等数组,具体代码如下
echo $_POST['dopost'];
?>
< form action="weste_net.php" ......
之前一直都是在服务器调试程序,有一天想弄到本地来,可死活就是连不上远程服务器了。
本地:windows+apache。
远程服务器:windows+ms sql 2008.
php和apache该配置的都配了,其他程序也可以运行,可就是连不上数据库。
苦苦寻觅 ......
来源:蓝色理想 作者: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
随着宽带的普及、 ......