PHP - include a php file and also send query parameters

后端 未结 13 1229
长发绾君心
长发绾君心 2020-11-27 03:46

I have to show a page from my php script based on certain conditions. I have an if condition and am doing an \"include\" if the condition is satisfied.

if(co         


        
13条回答
  •  天命终不由人
    2020-11-27 04:37

    Your question is not very clear, but if you want to include the php file (add the source of that page to yours), you just have to do following :

    if(condition){
        $someVar=someValue;
        include "myFile.php";
    }
    

    As long as the variable is named $someVar in the myFile.php

提交回复
热议问题