/** php xml操作類 link:http://bbs.it-home.org*/class requirelog{ protected static $requirelog; //get ready for xml,if xml is not found ,create xml static function _initializeLog() { if(file_exists('requirelog.xml')) {
//讀取xml $dom=new DOMDocument('1.0');$dom->load('data.xml');$em=$dom->getElementsByTagName('videos');//最外層節點$em=$em->item(0);$items=$em->getElementsByTagName('video');//節點//如果不用讀取直接添加的話把下面這一段去掉即可foreach($items as $a){foreach($a->attributes as
#------------------------------------------# # XML Library, by Keith Devens, version 1.2b # http://keithdevens.com/software/phpxml # # This code is Open Source, released under terms similar to the Artistic License. # Read the license at
/***********************************************************************Class: Mht File MakerVersion: 1.2 betaLink:bbs.it-home.orgAuthor: Wudi Description: The class can make .mht file.*****************************************************************
/** php產生word檔案 link:bbs.it-home.org*/$word = new COM("word.application") or die("無法啟動 Word 程式!");$word->Visible = 0;$n=$word->Documents->Add();## 分節符號$n->Sections->Add($word->Selection->Range,0);##
// PHP 4.3 or above needed define("BRIEF_LENGTH", 800); //Word amount of the Briefing of an Article function Generate_Brief($text){ global $Briefing_Length; if(strlen($text) $Foremost = substr($text, 0, BRIEF_LENGTH); $re = "/]*(>?)/i"; $Single =