關(guān)閉php X-Powered-By信息的方法:
網(wǎng)站出錯(cuò)時(shí),在文件頭會(huì)顯示PHP的版本,為了安全起見,我們可以關(guān)閉這個(gè)PHP版本的信息(X-Powered-By)
關(guān)閉方法:
立即學(xué)習(xí)“PHP免費(fèi)學(xué)習(xí)筆記(深入)”;
修改php.ini 文件
設(shè)置expose_php = Off即可。
說(shuō)明:
X-Powered-By會(huì)顯示PHP版本信息,會(huì)暴露服務(wù)器運(yùn)行的是php。
官方給出的說(shuō)明
Decides whether PHP may expose the fact that it is installed on the server(e.g. by adding its signature to the Web server header). It is no securitythreat in any way, but it makes it possible to determine whether you use PHPon your server or not.
決定服務(wù)器上是否暴露安裝有PHP,
(例如:把這些信息加到Web服務(wù)器頭響應(yīng))。這是不安全的。
但能確定你的服務(wù)器時(shí)候運(yùn)行著PHP。
意思就是打開的話可以告訴其他人這臺(tái)服務(wù)器可以運(yùn)行PHP,但不一定安全,可以關(guān)掉。
更多相關(guān)知識(shí),請(qǐng)?jiān)L問(wèn)?PHP中文網(wǎng)!!
PHP怎么學(xué)習(xí)?PHP怎么入門?PHP在哪學(xué)?PHP怎么學(xué)才快?不用擔(dān)心,這里為大家提供了PHP速學(xué)教程(入門到精通),有需要的小伙伴保存下載就能學(xué)習(xí)啦!
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號(hào)
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://m.miracleart.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號(hào)