PHP Require and Include GET

前端 未结 4 610
清酒与你
清酒与你 2021-01-13 05:39

I would like to require a file but also pass GET variables through the url, but when I write:

         


        
4条回答
  •  攒了一身酷
    2021-01-13 06:19

    It is not necessary to pass the variables to the new file, because by including the new file the variables are maintained. Remember that $ _GET is an array, and it can be modified within the script.

    
    

    On this case, $_GET['name'] is accesible from the "myfile.php"

提交回复
热议问题