Getting started with thinkphp6 (10) -- Modifying the code does not take effect immediately

thinkphp6 does not take effect immediately after modifying the code

Add the following code to index.php in the public directory

//处理调试模式下,文件修改不能即时生效问题,实际使用时2~5为最佳 - 上线记得去掉
ini_set('opcache.revalidate_freq',0);

If you are using mac mamp pro

The following cache needs to be turned off

 

If you can modify the php configuration file (I have not tried this)

Modify the php configuration file opcache.revalidate_freq=0;

tp5.1 Modified files cannot take effect in real time, and will take effect after about 60 seconds_tp5 Opening redis does not make changes in real time - CSDN Blog The article has been viewed 715 times. Solution: 1. Add ini_set('opcache.revalidate_freq',0); in public/index.php; 2. Modify the php configuration file opcache.revalidate_freq=0; _tp5 and enable redis. Changes are not real-time https://blog.csdn.net/qq_41605215/article/details/107015620

Guess you like

Origin blog.csdn.net/u013288190/article/details/133834634