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 5.4 に移行し、OPCache をインストールしました。これは非常に強力です!
キャッシュを一時的に無効にするにはどうすればよいですか?
私は試した :
ini_set('opcache.enable', 0);
しかし、それは効果がありません。
ありがとう
スクリプトが実行されたら、ファイルをキャッシュしないのは遅すぎます。PHP の外で設定する必要があります。
PHP が Apache モジュールとして実行される場合は、次の.htaccessファイルを使用します。
.htaccess
php_flag opcache.enable Off
PHP を CGI/FastCGI として実行する場合は、次の.user.iniファイルを使用します。
.user.ini
opcache.enable=0
いずれの場合も、php.iniアクセスできる場合は、システム全体で古き良きものを使用することもできます。
php.ini