在功能设计上尽量不要将文件包含函数对应的文件放给前端进行选择和操作;过滤各种…/…/, http://, https://;配置php.ini配置文件: allow_url_fopen = off allow_url_include = off magic_quotes_gpc = on通过白名单策略,仅允许包含运行指定的文件,其他都禁止;