W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
WinCache的安裝包包括一個名為wincache.php的PHP腳本,可用于獲取緩存信息和統(tǒng)計信息。
如果通過Microsoft Web Platform Installer安裝了WinCache擴(kuò)展,那么該腳本位于%SystemDrive%\Program Files\IIS\Windows Cache for PHP\目錄下。在64位版本的Windows Server操作系統(tǒng)上,該腳本位于%SystemDrive%\Program Files (x86)\IIS\Windows Cache for PHP\目錄下。如果擴(kuò)展是手動安裝的,則wincache.php將位于從安裝包的內(nèi)容中提取的相同文件夾中。
要使用wincache.php,請將其復(fù)制到Web站點的根文件夾或任何子文件夾中。為了保護(hù)腳本的安全性,使用文本編輯器打開它,并替換USERNAME和PASSWORD常量的值。如果服務(wù)器上啟用了任何其他IIS身份驗證,請按照注釋中的說明進(jìn)行操作。
示例 #1 Authentication configuration for wincache.php
<?php
/**
* ======================== CONFIGURATION SETTINGS ==============================
* If you do not want to use authentication for this page, set USE_AUTHENTICATION to 0.
* If you use authentication then replace the default password.
*/
define('USE_AUTHENTICATION', 1);
define('USERNAME', 'wincache');
define('PASSWORD', 'wincache');
/**
* The Basic PHP authentication will work only when IIS is configured to support
* Anonymous Authentication' and nothing else. If IIS is configured to support/use
* any other kind of authentication like Basic/Negotiate/Digest etc, this will not work.
* In that case use the array below to define the names of users in your
* domain/network/workgroup which you want to grant access to.
*/
$user_allowed = array('DOMAIN\user1', 'DOMAIN\user2', 'DOMAIN\user3');
/**
* If the array contains string 'all', then all the users authenticated by IIS
* will have access to the page. Uncomment the below line and comment above line
* to grant access to all users who gets authenticated by IIS.
*/
/* $user_allowed = array('all'); */
/** ===================== END OF CONFIGURATION SETTINGS ========================== */
?>
注意: 始終使用內(nèi)置身份驗證或服務(wù)器的身份驗證機(jī)制來保護(hù)wincache.php腳本。不保護(hù)此腳本可能會危及您的Web應(yīng)用程序和Web服務(wù)器的安全性。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: