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 ファイルの解析エラーを非表示にする必要がありますが、他のすべての PHP ファイルの解析エラーはそのままにしておきます。どうすればいいですか?
まず第一に、良い質問であり、IMHOも有効なものです。
PHP エラーを非表示にしたい関連フォルダーの .htaccess内で、ファイルの先頭に次の行を追加します。
php_flag display_errors off
これは、そのフォルダーのみに影響し、そのフォルダー内の PHP ファイルの PHP エラーをマスクしますが、サイトの残りの部分は影響を受けません。