在PHP中用引号括起来的“at”符号是什么意思?

时间:2012-06-20 11:43:22

标签: php arrays file

我有这段代码:

$filePath = '/blah/image.jpg';
$data_array = array(
  "file_data"=>"@".$filePath,
);

$data_array = array构造是数组定义,"file_data"=>"@".$filePath,指定数组元素。

然后使用该数组设置HTTP POST请求:

curl_setopt($request, CURLOPT_POSTFIELDS, $data_array);

"@"中的"@".$filePath是什么意思?

1 个答案:

答案 0 :(得分:4)

这是一个文字@符号前置于字符串。结果是值@/blah/image.jpg