Jump to content

curl_exec() causing browser asking to save php file


zell11

Recommended Posts

Hey there,

  I am having a problem when I am using curl_exec.  When i try and send a request using it all it does is come up and page asking me to save the php file that was user to call it.  Does anyone know what could cause this?

 

Thanks

 

Link to comment
Share on other sites

 

    $ch = curl_init();

 

    curl_setopt ( $ch, CURLOPT_URL, $this->config->get( "Configuration.host" ) );

    curl_setopt ( $ch, CURLOPT_POST, true );

    curl_setopt ( $ch, CURLOPT_POSTFIELDS, $xmldoc->getDocument() );

    curl_setopt ( $ch, CURLOPT_HTTPHEADER, array('Expect: ') );

    // Save the response in the response variable

    //

    $this->response = curl_exec($ch);

    $this->errno = curl_errno ($ch);

    $this->err_str = curl_error ($ch);

    $this->curl_getinfo = curl_getinfo($ch);

 

 

sorry bout the long time before i replied

 

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.