PHP, getting variable from another php-file

前端 未结 4 591
遥遥无期
遥遥无期 2020-11-27 04:18

So I wonder if it is possible to get a variable from a specific php-file when the variable-name is used in multiple php-file. An example is this:



        
4条回答
  •  遥遥无期
    2020-11-27 04:46

    You could also use file_get_contents

     $url_a="http://127.0.0.1/get_value.php?line=a&shift=1&tgl=2017-01-01";
     $data_a=file_get_contents($url_a);
    
     echo $data_a;
    

提交回复
热议问题