CodeIgniter Forums

Full Version: Posting URL / Links in an input via post breaks certain links.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

I am submitting links via a text input to a controller.

Certain links, such as this one work perfectly.

However, links such as this one return an error:

A PHP Error was encountered
Severity: Warning
Message: fopen(http //somepage.somewhere.ok.ut/place/geoserver/ows?service=WFS&request=GetFeature&versi;): failed to open stream: No such file or directory
Filename: controllers/controller.php
Line Number: 27
If I paste the link directly in the controller, it works however.

Basically, it breaks already here. If I try to echo out the input value, it returns the same value as the php error message.

class Controller extends CI_Controller
public function index()
    $data['page_title'] = "Title";
    $config['global_xss_filtering'] = FALSE;
    $this->load->view('header', $data);



    $csvLocationUrl = ($this->input->post('csvLocationUrlTextBox')) ?: FALSE;

El Forum

PHP Manual urlencode