codeigniter $_FILES upload |
In Codeigniter syntax for normal PHP code $_POST['name'] is $this->input->post('name'). Does anyone knows what is syntax in CI for $_FILES['file']?
I don't want to upload, I want to catch file and make some action before uploading. In upload helper is only this: $this->upload->do_upload('file') - and that is uploading. I want to manage file before this step. Thanks in advance
There is no special "syntax" for accessing $_FILES, nor is there a way to interact with any such file before it is uploaded.
There's also no particularly good reason to choose input->post() over $_POST. (06-08-2016, 01:07 PM)vladakg Wrote:(06-08-2016, 11:11 AM)Narf Wrote: There is no special "syntax" for accessing $_FILES, nor is there a way to interact with any such file before it is uploaded. input->post() does not avoid xss, unless told explicitly. input->post() only replaces: isset($_POST['something']) ? $_POST['something'] : NULL; https://codeigniter.com/user_guide/libra...erver-data Website: http://avenir.ro
$this->input->post('some_data', TRUE);
But I set $config['global_xss_filtering'] to TRUE.
You only need to use one or the other not both.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |