Home > Article > Backend Development > .ab.file, how to make it access only the ab directory_PHP tutorial
'./a/b/'.$file, how to make it only access the a/b directory
'./a/b/'.$file
If $file = '../1.php'
You can access /a/1.php
$file is entered by the user and is only allowed to access files under './a/b/'. What to do
Let me answer
D8888D reply content------------------------------------------------- ----------
Take the first two characters and see if they are ".."
If so, block