php¶ÁÈ¡ºÍ´´½¨wordÎĵµ
×ܽáϱ¾ÈËÔÚÈÕ³£¹¤×÷ÖÐʹÓÃphp²Ù×÷wordµÄһЩʵս¡£
·½·¨Ò»£ºÀûÓÃphp comÄ£¿é
¡£Ò²¼´ÀûÓÃwordÌṩµÄ±¾µØapi£¬ËùÓÐÖ»ÊÊÓÃÓÚwindowsϵͳÉÏ¡£
<?php
$word = new com('word.application') or die('ÎÞ·¨´ò¿ªword');
$word->Visiable = false;
$doc_file = '/path/to/doc';
$word->Open($doc_file);
$text = 'Õâ¶ÎÎÄ×Ö½«±»Ð´µ½wordÎĵµÖÐÈ¥';
$word->Selection->TypeText($text);
//±£´æ
$word->ActiveDocument->Save();
//¶ÁÈ¡ÄÚÈÝ
$doc_file_contents = $word->ActiveDocument->Content->Text;
//Êä³öwordÄÚÈÝ
$word->PrintOut();
$word->Close();
?>
ÀûÓÃcomÁ¬½Óword£¬¾³£ÎÞ·¨Ô¤ÆÚÔËÐгɹ¦£¬Ä¿Ç°Ò²²»ÖªµÀÊÇʲôÔÒò£¬ÔÝʱ¿¿ÔËÆø°É¡£
·½·¨¶þ£ºÀûÓÃcatdoc¡£catdocÊÇlinuxÉϵŤ¾ß£¬ÐèÒª×ÔÐа²×°ÅäÖá£
<?php
//catdocλÖÃ
$cat_doc = '/usr/local/bin/catdoc';
$doc_file = 'this is a doc file';
//¶ÁÈ¡wordÎļþÄÚÈÝ
$doc_file_contents = shell_exec($cat_doc . ' ' . $doc_file);
echo nl2br($doc_file_contents);
?>
¸ü¶àcatdocµÄ¹¦ÄÜ£¬Çë²éÔÄcatdocÎĵµ¡£
ÓÉÓÚcatdocÊÇlinuxµÄ¹¤¾ß£¬ËùÒÔÉÏÃæµÄÕâ¶Î´úÂëÖ»ÄÜÔËÐÐÔÚlinux·þÎñÆ÷ÉÏ£¬¶øÒѱØÐë°²×°ÁËcatdoc¡£
Ïà¹ØÎĵµ£º
it is 21th of May. The Month of PHP Security
(http://www.php-security.org) is still running and we have reached a
vulnerability count of 40 vulnerabilities, which is nearly as much as we
disclosed during the whole Month of PHP Bugs in 2007. However there are
11 more days until the end of May and ......
Æ¥ÅäÖÐÎÄ×Ö·ûµÄÕýÔò±í´ïʽ
£º [\u4e00-\u9fa5]
Æ¥ÅäË«×Ö½Ú×Ö·û(°üÀ¨ºº×ÖÔÚÄÚ)
£º ["\x00-\xff]
Ó¦Ó㺼ÆËã×Ö·û´®µÄ³¤¶È
£¨Ò»¸öË«×Ö½Ú×Ö·û³¤¶È¼Æ2£¬ASCII×Ö·û¼Æ1£©
String.prototype.len=function(){return
th ......
<?php
$connstr="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("data.mdb");
$connid=odbc_connect($connstr,"","",SQL_CUR_USE_ODBC);
$issuetime=date("Y-m-d H:i:s");
$sql="insert into test values("","",...)";
$result=odbc_exec($connid,$sql);
if($result) echo "successful";
else ec ......
½ñÌ쿪ʼѧϰPHP£¬¸Ð¾õ¿´¹ý¾ÍÍüÁË£¬É¶¶¼Áô²»Ï±ȽÏÒź¶£¬¾Í±ß¿´±ß×ܽáÁË£¬·½±ã×Ô¼ºÒÔºó¿´£¬Ò²·½±ã±ðÈË¿ìËÙÈëÃÅ£¬»òÕß¿ìËÙ¸´Ï°°É(awen)¡£
µÚÒ»²¿·Ö ´î½¨Æ½Ì¨
1. ¿ÉÒÔÏÂÔØÒ»¸öphp for windows iis °æ±¾ ×îÊ¡¾¢£¬Ö±½Ó°²×°ºó×Ô¶¯Éý¼¶iisʹÆäÖ§³Öphp¹¦ÄÜ¡£
2.   ......
¡¡¡¡¶ÔÓÚ³õѧPHPÓïÑÔµÄÅóÓÑÀ´Ëµ£¬PHP»¹ÓкܶණÎ÷ÐèÒªÉîÈëµÄ̽¾¿¡£Ö»ÓÐÔÚ²»¶ÏµÄÎÊÌâ´¦ÀíÖвÅÄÜÕÆÎÕÆäÖеÄÕæÖ¿¡£Ê²Ã´ÊÇPHPÎÞÏÞ·ÖÀàÄØ?¾ÍÏñwindowsÏÂн¨Ò»¸öÎļþ¼Ð£¬ÔÚн¨µÄÎļþ¼ÐÏÂÓÖ¿ÉÒÔн¨Ò»¸öÎļþ¼Ð£¬ÕâÑùÎÞÏÞÑ»·ÏÂÈ¥£¬ÎÞÏÞ·ÖÀàÒ²ÊÇÕâÑù£¬¸¸Àà¿ÉÒÔ·Ö³öËü×ÓÀ࣬×ÓÀàÓÖ¿ÉÒÔ·Ö³öËüµÄ×ÓÀ࣬ÕâÑùÒ»Ö±ÎÞÏÞÑ»·ÏÂÈ¥¡£
¡¡¡¡Ä ......