phpwind 8.7 隐藏data目录

官方说可以放在不能www访问的目录,这个似乎不行,因为为了防止跨站和对上级目录的访问,尝试过上级目录,但是不行

[email protected]:#mkdir -p /var/safedir
[email protected]:#mv data/ /var/safedir/
[email protected]:#sed -i "s/define('D_P',R_P);/define('D_P','\/var\/safedir\/');/" global.php
[email protected]:#cat global.php | grep "define('D"
define('D_P','/var/safedir/');

 

[email protected]:#mkdir safedir
[email protected]:#mv data/ safedir/
[email protected]:#sed -i "s/define('D_P',R_P);/define('D_P','safedir\/');/" global.php
[email protected]:#cat global.php | grep "define('D"
[email protected]:#mv admin.php abc.php
[email protected]:#sed -i "s/define('D_P',R_P);/define('D_P','safedir\/');/" abc.php
define('D_P','/var/safedir/');

 

分享到:

make a comment

(opt)