Call PHP function from url?

前端 未结 14 1637
清歌不尽
清歌不尽 2020-12-04 15:50

If I want to execute a php script, i just point the browser to www.something.com/myscript.php

But if i want to execute a specific function inside

14条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-04 16:22

    You could also for security, check the HTTP Referrer. And only execute functions if the referrer is the same domain as itself. Perhaps also compare / check verious other things.

    But there should be many ways you can verify the request is coming from the same website were the function needs to be executed.

提交回复
热议问题