I received this message:
Deprecated: curl_setopt_array(): The usage of the @filename API for file uploading is deprecated. Please use the CURLFile class instead
I know that I can rewrite my code using the CURLFile class, but it is only available with 5.5.
My site should work on PHP 5.3, PHP 5.4 or PHP 5.5, so I canβt refuse compatibility between 5.3 and 5.4. Therefore, I can not use CURLFile.
How can I rewrite code so that it runs in any PHP without checking PHP versions?
source share