Best way to avoid code injection in PHP

前端 未结 10 1188
臣服心动
臣服心动 2020-12-01 05:29

My website was recently attacked by, what seemed to me as, an innocent code:



        
10条回答
  •  失恋的感觉
    2020-12-01 06:15

    pek, for a short term fix apply one of the solutions suggested by other users. For a mid to long term plan you should consider migrating to one of existing web frameworks. They handle all low-level stuff like routing and files inclusion in reliable, secure way, so you can focus on core functionalities.

    Do not reinvent the wheel. Use a framework. Any of them is better than none. The initial time investment in learning it pays back almost instantly.

提交回复
热议问题