Interface-php Curlopt_postfields How to fill in the absolute path parameters? (Because the image cannot be uploaded to the absolute path)
Source: Internet
Author: User
Keywordsinterface php help picture upload parameters
interface php help picture upload parameters
Use the upload image interface to write a PHP file.
HTML代码如下:
PHP Code: curl_setopt ($ch, curlopt_postfields, third parameter); The interface requires the third parameter to be a media=@ absolute path. But the internet to find a lot of information, it seems unable to obtain the user uploaded images of the absolute path, ask you God, how to solve this problem?
PS: I have also looked for some tutorials, said the third parameter can be dirname (__file__). " Picture name ", DirName get the directory path of the server PHP file? But if my php file is placed in the/usr/php/, wouldn't it be a request that users upload pictures in their computer's/usr/php/? What's going on here? Ask for help, you big God help me
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.