<?php $file = !empty($_GET['f']) && is_string($_GET['f']) && ctype_print($_GET['f']) ? trim(str_replace('..', '', (string)$_GET['f']), '/') : ''; $allowedPaths = [ 'index.php', 'parsedown.php', 'src.php', ]; $maskStrings = [ ]; if(empty($file) || !isset($_GET['f'])) $file = $allowedPaths[0]; if(in_array($file, $allowedPaths, true)) { $file = file_get_contents($file); foreach($maskStrings as $string) $file = str_replace($string, '*****', $file); highlight_string($file); }