Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

phpÖÐʹÓÃcom×é¼þ³öÏÖ"¾Ü¾ø·ÃÎÊ"µÄ´¦Àí


´úÂëÈçÏ£¬
// ½¨Á¢Ò»¸öÖ¸ÏòÐÂCOM×é¼þµÄË÷Òý
$word = new COM("word.application") or die("Can't start Word!");
// ÏÔʾĿǰÕýÔÚʹÓõÄWordµÄ°æ±¾ºÅ
echo "Loading Word, v. {$word->Version}
";
exit;
?>
ÓÐʱºòÄã»áµÃµ½Ò»¸ö´íÎó£¬
PHP Fatal error: Uncaught exception 'com_exception' with message 'Failed
to create COM object `word.application': ¾Ü¾ø·ÃÎÊ. '
½â¾ö·½·¨£º
µã»÷¿ªÊ¼²Ëµ¥£¬ÔËÐÐdcomcnfg
Ë«»÷“×é¼þ·þÎñ”£¬Ë«»÷“¼ÆËã»ú”£¬Ë«»÷“ÎҵĵçÄÔ”£¬Ñ¡Ôñ“DCOMÉèÖÔ
ÔÚÓÒ±ßÕÒµ½ÐèÒªµÄCOM×é¼þ£¬´ËÀýÖÐΪ“Microsoft Word Îĵµ”
ÓÒ»÷£¬´ò¿ª“ÊôÐÔ”²Ëµ¥£¬Ñ¡Ôñ“°²È«”±êÇ©
½«“Æô¶¯ºÍ¼¤»îȨÏÞ”ÉèÖóɓ×Ô¶¨Ò唣¬È»ºóµã»÷±à¼­
µã»÷“Ìí¼Ó”>>“¸ß¼¶”>>“Á¢¼´²éÕÒ”£¬ÕÒµ½“internet À´±öÓû§”£¨Ä¬ÈÏΪIUSER_µçÄÔÃû£©£¬µã»÷“È·¶¨”
½«“internet À´±öÓû§”µÄȨÏÞÉèÖÃΪ±¾µØÆô¶¯ÔÊÐí£¬±¾µØ¼¤»îÔÊÐí
È·¶¨£¬Íê³É
ÔÙ´ÎÔËÐÐÉÏÊö³ÌÐò£¬ÏÔʾ½á¹ûΪ
"Loading Word, v. 11.0"
±¾ÎĵØÖ·
DONE.Good Luck.^^
 ²¹³ä£º
php.iniÖÐÉèÖÃ
com.allow_dcom = true
²Î¿¼×ÊÁÏ:
http://bugs.php.net/bug.php?id=32133
http://figured-it-out.com/figured-out.php?sid=24


Ïà¹ØÎĵµ£º

PHP ÖÐ×Ô¶¨Ò庯ÊýµÄ¼¸ÖÖ·½Ê½


PHPÖÐͨ³£Óм¸ÖÖ×Ô¶¨Ò庯ÊýµÄ·½·¨£¬ÏÂÃæ½éÉÜһϣ¬ÎÒÃÇʹÓõÄÊÇÕâÖÖ·½Ê½£º
<?php
function foo($arg)
{
return $arg
}
?>
µ±Ä³Ð©²ÎÊýΪ¿ÉÑ¡ÊÇ£¬¿ÉÒÔÕâÑù¶¨Ò壺
<?php
function foo($arg = NULL)
{
return $arg == NULL ? "" : $arg;
}
?>
µ±ÎÒÃDz»ÏÞÖƲÎÊý¸öÊýµÄʱºò£¬Ò²¿ÉÒ ......

[PHP]PDOµÄʹÓÃ

1. °²×°php5.1ÒÔÉϵİ汾,ÓÐÖ§³Öpdo!ΪÁËʹÄãµÄ»·¾³ÄÜÌṩ¶ÔpdoµÄÖ§³Ö!ÔÚphp.iniÎļþ¼ÓÈëÒÔÏÂ:
extension=php_pdo.dll
extension=php_pdo_mysql.dll
extension=php_pdo_mssql.dll(Ö§³ÖmssqlÊý¾Ý¿â)
2. ÒÔÏÂΪPHÖÐPDOµÄ¾ßÌåʹÓÃ
 <?php
$dsn = 'mysql:dbname=MyDbName;host=localhost';
$user = 'root';
......

PHP¼ÆËãÒ³ÃæÖ´ÐÐʱ¼ä

run_time.php  Code:
<?php
class runtime
{
var $StartTime = 0;
var $StopTime = 0;
function get_microtime()
{
list($usec, $sec) = explode(' ', microtime());
return ((float)$usec + (float)$sec);
}
function start()
{
$this->StartTime = $this->get_microtime();
}
f ......

linuxÏÂapache+php°²×°³£¼ûÎÊÌâ


configure: error: Unable to find libgd.(a|so)
Èç¹ûʹÓõÄÊÇubuntu»òdebian¾ÍºÜ¼òµ¥ÁË£¬Ö±½Ósudo apt-get install apache2
libapache2-mod-php5 php5 php5-gd ¾Í»ù±¾Éϸ㶨£¬µ«ÊÇÓÃÔ´´úÂë°²×°»¹ÊǺÜÂé·³¡«
wget http://www.boutell.com/gd/http/gd-2.0.11.tar.gz
tar zxvf gd-2.0.11.tar.gz
cd gd-2.0.11
sudo . ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ