PHP生成word文档
<?PHP
$word = new COM("word.application") or die("Can't start Word!");
// print the version of Word that's now in use
echo "Loading Word, v. {$word->Version}";
// set the visibility of the application to 0 (false)
// to open the application in the forefront, use 1 (true)
$word->Visible = 0;
// create a new document in Word
$word->Documents->Add();
// add text to the new document
$word->Selection->TypeText("Testing 1-2-3...");
//save the document in the Windows temp directory
$word->Documents[1]->SaveAs("C:\comtest.doc");
// close the connection to the COM component
$word->Quit();
?>
相关文档:
function randomkeys($length)
{
$key='';
$pattern='123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
for($i=0;$i<$length;$i++)
{
$key .= $pattern{mt_rand(0,47)};
}
  ......
初学php,需要搭建其开发环境。由于版本更替等原因,网上的方法几乎一人一个样,让人无所适从。昨天花了一晚上时间才在XP下配置好,现将其整理出来,希望能对别人有用。(2007-11-21)
一、 下载软件。
1. 下载apache_2.0.55-win32-x86-no_ssl.msi,右键用迅雷点击此处下载(直接点击不行)。
2. 下载php-5 ......
PHP连接数据库之PHP连接MYSQL数据库代码 < ?php
$mysql_server_name='localhost';
//改成自己的mysql数据库服务器
$mysql_username='root';
//改成自己的mysql数据库用户名
$mysql_password='12345678';
//改成自己的mysql数据库密码 &nb ......
最近弄PHP邮件发送时,从网上载了段代码,总是有些问题,所以对这些问题的解决作一个记录,方便以后查阅。
PHP发送邮件:
1、class.phpmailer.php 类包的官网下载最新版的phpmailer类,要注册的哦。
2、注意看你的发送邮箱是不是开通的SMTP服务。登录邮箱 -> 设置, 查看是否支持SMTP或是否开启。
3、问题:it is no ......