class TemplateController
{
public function get(string $template): string
{
return file_get_contents(_DIST . '/resources/templates/' . $template . '.html');
}
}
我使用$ _GET或地址栏的直接参数从SPA应用程序导入模板。这会引起问题吗?
我在输入中使用引号来运行命令以访问不可访问的文件等。>>
class TemplateController {公共函数get(string $ template):字符串{return file_get_contents(_DIST。'/ resources / templates /'。$ template。'.html'); }}我使用$ _GET或...
[有人可能会向使用$template
或../
导航到您在参数中设置的目录的/
变量中传递值。