Reputation: 170489
I've got this code:
$filePath = '/blah/image.jpg';
$data_array = array(
"file_data"=>"@".$filePath,
);
the $data_array = array
construct is an array definition and "file_data"=>"@".$filePath,
specifies an array element.
The array is then used for setting up an HTTP POST request:
curl_setopt($request, CURLOPT_POSTFIELDS, $data_array);
What does "@"
in "@".$filePath
mean?
Upvotes: 0
Views: 139
Reputation: 219834
It's a literal @
sign being prepended to a string. The result is a value of @/blah/image.jpg
Upvotes: 4