PHP

PHP生成PDF

有时我们需要使用脚本动态的创建PDF文档,这里介绍一些免费的开源PHP脚本来生成PDF 的方法。

 

1.FPDF: PDF生成器

FPDF是一个纯粹的通过PHP类来生成PDF文档的方法,需要生成的内容直接在PHP代码中来指定,生成文字,图片,线条等等,都有自己的方法。下面介 绍一个用FPDF来生成”Hello World”的PDF文档:

 

博客分类: 

PHP 随笔

1. 截断字符函数substr() 和mb_substr().

在截断字符时,一般都会使用substr()这个函数。但是强烈推荐使用mb_substr(),后者在处理特殊字符上可使用mb_internal_encoding()函数设定字符集格式。

区别可参考如下例子:

<?php
$str = 'ñ Substr() ñ Mb_substr() ñ Others';
mb_internal_encoding("UTF-8");
echo substr($str, 0, 28),"<br>";
echo mb_substr($str, 0, 28),"<br>";

?>

博客分类: 

Gmail的发送限制

发送限制

为了抵制垃圾邮件和防止滥用行为,如果您将邮件发送给超过 500 个收件人,或者发送大量无法递送的邮件,Google 会暂时停用您的帐户。如果您使用 POP 或 IMAP 客户端(如 Microsoft Outlook 或 Apple Mail),可能一次只能将邮件发送给 100 个人。您的帐户应该会在 24 小时内重新启用。

如果您经常与同一群人进行交流,那么您可能会对 Google 网上论坛感兴趣。

 

源地址:https://mail.google.com/support/bin/answer.py?hl=cn&answer=22839

博客分类: 

What's the difference between VC9 and VC6 when you download PHP?

 

Which version do I choose?

If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP

If you are using PHP with IIS you should use the VC9 versions of PHP

VC6 Versions are compiled with the legacy Visual Studio 6 compiler

VC9 Versions are compiled with the Visual Studio 2008 compiler and have improvements in performance and stability.

博客分类: 

PHPCMS验证码显示不出来的解决办法

今天遇到phpcms系统中验证码显示不了的情况,查了下资料,发现有2种情况。

我是通过,修改checkcode.php,include/common.inc.php和include/config.inc.php文件的编码格式为utf8解决了。

请参考:

http://bbs.phpcms.cn/thread-118224-1-1.html

http://bbs.phpcms.cn/viewthread.php?tid=94617&highlight=%D1%E9%D6%A4%C2%EB

博客分类: 

页面