在一台處理網路支付的伺服器遷移的時候,發現不能支付。1.PHP版本為5.3.32.系統為Red Hat 4.1.2-54查看apache的錯誤記錄檔,發現是加密檔案中一個函數bcmul()報錯:PHP Fatal error: Call to undefined function bcmul() in /php_rsa.php on line xxx 這個函數是PHP數學擴充中的一個。使用 bcscale() 來設定全域預設的小數位元,具體用法如下:<?php echo
錯誤提示提示資訊:Warning: Failed to write session data (files).Please verify that the current setting ofsession.save_path is correct () in Unknown on line 0解決辦法 代碼如下複製代碼 session.save_path = "D:/phprun/tmp" 這個為自訂檔案夾
安裝:ImageMagick 代碼如下複製代碼 wget http://www.imagemagick.org/download/ImageMagick-7.0.1-5.tar.gz tar -xzvf ImageMagick-7.0.1-5.tar.gz ./configure --prefix=/usr/local/imagemagick make make install安裝ImageMagick的php擴充:
第一種:利用模板。目前PHP的模板可以說是很多了,有功能強大的smarty,還有簡單易用的smarttemplate等。它們每一種模板,都有一個擷取輸出內容的函數。我們產生靜態頁面的方法,就是利用了這個函數。用這個方法的優點是,代碼比較清晰,可讀性好。 這裡我用smarty做例子,說明如何產生靜態頁require('smarty/Smarty.class.php');$t = new Smarty;$t->assign("title","Hello
class Makehtml{ public $MbUrl,$OutUrl,$AllHtml,$SouChar,$ObjChar; //變數 public $row; //遊標 public $Shuzusou,$Shuzuobj; //替換的字串數組 //-----------------------初始化-------------------------
<?php// $parent is the parent of the children we want to see// $level is increased when we go deeper into the tree,// used to display a nice indented treefunction display_children($parent, $level) { &