修改ZBLOG后台位置如此重要
<div style="color: black; text-align: left; margin-bottom: 10px;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">修改后台<span style="color: black;">位置</span><span style="color: black;">常常</span>是<span style="color: black;">非常多</span>网站新手们容易忽略的一个问题,但其实在<span style="color: black;">有些</span>大型网站中,网站后台<span style="color: black;">位置</span><span style="color: black;">倘若</span>能够被普通网民找到的话,严格<span style="color: black;">道理</span>上<span style="color: black;">来讲</span>应该<span style="color: black;">能够</span>被<span style="color: black;">叫作</span>之为一个漏洞。今天要说的是个人博客程序Z-Blog PHP版<span style="color: black;">怎么样</span>修改后台<span style="color: black;">位置</span>,<span style="color: black;">这儿</span>以Z-Blog PHP 1.4 Deeplue为例。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">首要</span><span style="color: black;">咱们</span>要<span style="color: black;">晓得</span>Z-Blog PHP版的默认后台<span style="color: black;">位置</span>是http://域名/zb_system/login.php,<span style="color: black;">经过</span>这个<span style="color: black;">位置</span>,<span style="color: black;">咱们</span><span style="color: black;">能够</span>在Z-Blog PHP版的源文件中找到对应目录中的后台登陆文件,<span style="color: black;">亦</span><span style="color: black;">便是</span>在zb_system文件夹中的login.php文件,除了login.php这个后台登陆文件外,<span style="color: black;">咱们</span>还要<span style="color: black;">晓得</span>在zb_system这个文件夹中的文件名为admin的子文件夹是Z-Blog的后台管理目录(<span style="color: black;">谨慎</span>!!!),还有cmd.php这个文件<span style="color: black;">亦</span>是需要<span style="color: black;">咱们</span>修改的。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/3e80000107d5fdc6d93~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728105438&x-signature=PlWHNcfXAN3oYtxmog3rmxjE%2Bqc%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/3e5000177b9b9e64461~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728105438&x-signature=eZGp%2FG1NasYoWivSCB%2BkIaqtdLs%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">除此之外,Z-Blog后台自带的“应用中心”插件是调用了admin目录的,<span style="color: black;">因此呢</span><span style="color: black;">咱们</span><span style="color: black;">亦</span>要将“应用中心”插件的main.php进行修改,Z-Blog的插件目录是在zb_users目录下的子目录plugin,在plugin中<span style="color: black;">能够</span>看到“应用中心”插件的目录是AppCentre,进入AppCentre文件夹,找到main.php文件。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/3e80000109e8c0a22a2~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728105438&x-signature=XoiCzXMSBnXM9OCXMHXetsg%2BPXI%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/3e700017b6e40c6f451~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728105438&x-signature=AQD7Y06rN3o6B3WgW%2F7GKe5Y54o%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/3e5000177e2b23be7fb~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728105438&x-signature=m%2FPIZtYTGmjeSjIGmbTbn9recMI%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/3e6000001a242684591~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728105438&x-signature=SA5rfj3nTmGZkESDY0qo4y5qSkI%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">接下来<span style="color: black;">咱们</span><span style="color: black;">首要</span>要修改的是后台登陆文件login.php,<span style="color: black;">这儿</span><span style="color: black;">咱们</span>直接对login.php进行重命名,<span style="color: black;">这儿</span>我将login.php修改为1111100000.php,<span style="color: black;">大众</span>自己随意修改,只要保持后缀.php不变就OK。<span style="color: black;">而后</span>将zb_system下的管理目录admin进行文件夹重命名,<span style="color: black;">这儿</span>我修改为houtai。<span style="color: black;">而后</span>用记事本打开文件cmd.php,<span style="color: black;">运用</span>Ctrl+H打开记事本的替换功能,将login.php替换为<span style="color: black;">咱们</span><span style="color: black;">刚才</span>修改的文件名1111100000.php,<span style="color: black;">这儿</span>要替换的应该<span style="color: black;">仅有</span>一处。<span style="color: black;">而后</span>再次打开替换功能,将admin/替换为houtai/(加/是防止替换掉其他的admin数据,<span style="color: black;">因此</span>必须加/)。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p6-sign.toutiaoimg.com/3e8000010adba0a8388~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728105438&x-signature=MosXipNw3pMkL1KZoSHWjH2h2Ug%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/3e5000177f41d95db2a~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728105438&x-signature=xHNz1lLp8tqhMp1VxEWD7%2BCAkPs%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span>进入管理目录houtai,用记事本打开其中的源文件admin_top.php、category_edit.php、edit.php、index.php、member_edit.php、module_edit.php、tag_edit.php。在这些文件中<span style="color: black;">运用</span>替换功能将zb_system/admin/替换为zb_system/houtai/。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/3e6000001b9d08ca164~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728105438&x-signature=QKev6mQfzVFatzQz53ov54P8DcE%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p26-sign.toutiaoimg.com/3e700017b8b02da34eb~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728105438&x-signature=NMbFKRIAdYEY7HLLM07k%2Bzx4RpE%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">此时后台<span style="color: black;">位置</span><span style="color: black;">已然</span>修改为http://域名/zb_system/1111100000.php,接着我们要修复一下Z-Blog自带的“应用中心”插件,<span style="color: black;">咱们</span>将之前找到的main.php源文件用记事本打开,<span style="color: black;">运用</span>替换功能将zb_system /admin/替换为zb_system /houtai/,<span style="color: black;">倘若</span>以后安装其他插件时需要调用管理目录的话,在zb_users/plugin/中找到插件对应的目录,<span style="color: black;">而后</span>找到其中的错误文件后,<span style="color: black;">亦</span>用<span style="color: black;">这般</span>的方式将zb_system /admin/替换为zb_system /houtai/就<span style="color: black;">能够</span>了。<span style="color: black;">这儿</span>举一个例子,例如我修改后台文件后,默认自带的“静态管理中心”插件,点击插件后面的管理时,<span style="color: black;">显现</span>了如下错误。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/3e700017b9a352cb941~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728105438&x-signature=A7n4yonW3WBPzcglvsMf9QB2Pnk%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">①错误文件路径:<span style="color: black;">这儿</span><span style="color: black;">咱们</span><span style="color: black;">能够</span>看到出错的文件是STACentre这个插件目录中的main.php,它的绝对路径是</p>/zb_users/plugin/STACentre/main.php。
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">②错误位置:出错的位置<span style="color: black;">便是</span></p>zb_system/admin/admin_header.php这个文件,意思<span style="color: black;">便是</span>这个插件需要调用admin_header.php,<span style="color: black;">然则</span>这个文件是出错的。
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">③错误提示:admin_header.php这个文件到底出什么错了呢?错误提示中的“No such file or directory”告诉<span style="color: black;">咱们</span>“<span style="color: black;">无</span>这个的文件或目录”。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">原由</span>很简单,<span style="color: black;">由于</span><span style="color: black;">咱们</span>之前修改了admin这个管理目录的名字,<span style="color: black;">因此呢</span><span style="color: black;">咱们</span><span style="color: black;">这儿</span>找到出错的文件</p>/zb_users/plugin/STACentre/main.php,将这个文件中的zb_system/admin/替换为zb_system/houtai/就<span style="color: black;">能够</span>了,其他的错误文件<span style="color: black;">亦</span>是<span style="color: black;">这般</span>去<span style="color: black;">查询</span>的。
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">最后提醒一下,<span style="color: black;">咱们</span><span style="color: black;">能够</span>只修改后台<span style="color: black;">位置</span>,<span style="color: black;">倘若</span>连同管理目录<span style="color: black;">一块</span>修改的话,虽然安全性会更高,但以后每次更新程序或插件的话,可能都需要<span style="color: black;">咱们</span>手动去修改一次。</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">源自</span>羽度非凡博客(<span style="color: black;">微X</span>:iamydff),转载请注明出处!</p>
</div>
楼主发的这篇帖子,我觉得非常有道理。
页:
[1]