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


What does "at" symbol enclosed in quotes mean in PHP?

我有这个代码:

$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中的"@"是什么意思?

它是一个字面@符号,附加到字符串前面。结果是值为 @/blah/image.jpg