首页 > 解决方案 > How i can make some variables in a url and a text $u1.txt

问题描述

I have a url that already has some variables:

api/search.php?name=Carl&name2=Carlos

but I copy that to explode the data in arrays to save it in a txt file like

I try

$var_c = implode ('', file ('https://awebsite/api/search.php?name=$Variable1&name2=$variable2"'));

but i have not the variables in the url the request is 0

then the txt file must save a file from a other Variable

$dateiA = "test.txt";  

I try

$dateiA = "$test.txt";  

the variables not working at all

Does anyone have an idea? thx a lot.

标签: phpsqlurl

解决方案


我不完全理解这个问题,但我认为你需要的是:

您可以像这样访问 URL 参数: $urlParameters = $_GET;

你会得到一个如下所示的数组:

array(
  'name' => 'Carl',
  'name2' => 'Carlos',
)

推荐阅读