Lets say I want to build a simple PHP script that let me access files inside a folder:
$path = $_GET['path'];
$path = str_replace('..', '', $path);
$path = "./static/" . $path;
Is the line 2 on this example enough to avoid people reading files outside the 'static' folder?