Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はケーキPHP 2.1を使用しています。アプリケーションの多くの場所で「無効なパラメータ」のようなエラー メッセージを表示したい.1 つの場所で定義し、多くの場所で使用したい.Cake PHP でこれを達成するにはどうすればよいですか.
YourApplication/app/config/bootstrap.php で定数を定義し、アプリケーションでその定数を使用するだけです
define('INVALID_MSG','Invalid Parameter');