我试图使用 p>
<从JSON文件中读取常量 code> $ const = file_get_contents('/ myfolder / const.json'); code> pre>问题是这将始终从缓存中读取文件,而不是从本地XAMPP读取 服务器。 在开发阶段,由于编辑,此文件是动态的,每当文件发生更改时,我最终都会清除浏览器缓存。 我怎么能强制总是从服务器读取(在开发阶段这样做的延迟很好。我将切换到正常的部署后 - 如何?)? 任何帮助表示赞赏。 p> div>
I am trying to read my constants from a JSON file using
$const = file_get_contents('/myfolder/const.json');
Problem is this will always read the file from cache and not from my local XAMPP server. During development phase, this file is dynamic due to edits and I end up clearing the browser cache everytime there's a change in the file. How can I force to read from the server always (latency in doing this during development phase is fine. I will switch to normal post deployment - how?)? Any help is appreciated.
我试图使用 p>
<从JSON文件中读取常量 code> $ const = file_get_contents('/ myfolder / const.json'); code> pre>问题是这将始终从缓存中读取文件,而不是从本地XAMPP读取 服务器。 在开发阶段,由于编辑,此文件是动态的,每当文件发生更改时,我最终都会清除浏览器缓存。 我怎么能强制总是从服务器读取(在开发阶段这样做的延迟很好。我将切换到正常的部署后 - 如何?)? 任何帮助表示赞赏。 p> div>