0
我目前使用的(使用PHP 5.2.17)時的mkdir返回false在CakePHP中1.3.10下面的代碼:CakePHP:我如何捕獲mkdir錯誤?
CakeLog::write('error', "An error occurred while creating the \"$target_dir\" directory.");
我想也捕捉到確切的錯誤信息,如:
Warning (2): mkdir() [function.mkdir]: File exists
我可以在日誌中包含該錯誤消息。我怎麼用CakePHP來做到這一點?我已經使用error_get_last
功能嘗試,但它只是說:
Non-static method Configure::getInstance() should not be called statically, assuming $this from incompatible context
任何幫助,將不勝感激。
該錯誤不是來自'error_get_last()'。什麼是你使用的確切代碼? – CodeCaster