Jump to content

Public static variables question


Lukeidiot

Recommended Posts

You can't do it like that. You have to use a separate line of code to do an assignment.

 

You need to use those options at some point, right? Use the $CURL_OPTIONS as a template and then provide the specific information (ie, the CURLOPT_PROXY value) at runtime.

$options = self::$CURL_OPTIONS;
$options[CURLOPT_PROXY] = $this->getProxy();

You can't do it like that. You have to use a separate line of code to do an assignment.

 

You need to use those options at some point, right? Use the $CURL_OPTIONS as a template and then provide the specific information (ie, the CURLOPT_PROXY value) at runtime.

$options = self::$CURL_OPTIONS;
$options[CURLOPT_PROXY] = $this->getProxy();

 

What's the best way to add those options to this:

f75fbe7e30697972018a44b1c5b0c655.png

 

I ask because when I assign the options, its also in array (making $options[CURLOPT_PROXY] = $this->getProxy(); throw an error because of the parenthesis)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.