1
我正在使用蛋糕PHP 2.1。我想在應用程序的許多地方顯示錯誤消息,如'無效參數'。我想在一個地方定義它並在很多地方使用。我可以在Cake PHP中實現這一點。蛋糕PHP在一個地方定義字符串常量
我正在使用蛋糕PHP 2.1。我想在應用程序的許多地方顯示錯誤消息,如'無效參數'。我想在一個地方定義它並在很多地方使用。我可以在Cake PHP中實現這一點。蛋糕PHP在一個地方定義字符串常量
只需在YourApplication /應用/配置/ bootstrap.php中定義常量和使用,不斷在你的應用程序
define('INVALID_MSG','Invalid Parameter');