PHP - include() file not working when variables are put in url?

后端 未结 5 1656
梦毁少年i
梦毁少年i 2021-01-13 18:28

In PHP I\'ve build a webpage that uses include() for loading parts of the website. However, I now ran into something like a problem: When I use an url like: data-openo

5条回答
  •  离开以前
    2021-01-13 19:06

    include in this way doesn't fetch a URL, it fetches a file from the filesystem, so there's no such thing as a query string.

    You can do this, though:

    $_GET['type'] = 'actueel';
    include('data-storingen.php');
    

提交回复
热议问题