Jump to content

Public static variables question


Lukeidiot
Go to solution Solved by requinix,

Recommended Posts

  • Solution

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();
Edited by requinix
Link to comment
Share on other sites

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)

Edited by Lukeidiot
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.