Welcome Guest, Not a member yet? Register   Sign In
Image Resize - How to find the stored file name?
#4

[eluser]Unknown[/eluser]
It's easy
just add 'file' library to your controller and use 'read_file' function to read the file name you uploaded

controller
Code:
$this->load->helper('file');

if(isset($_FILES['userfile'])){
$file     = read_file($_FILES['userfile']['tmp_name']);
echo $name     = basename($_FILES['userfile']['name']);

view
Code:
<input type="file" name="userfile" size="40" />


Messages In This Thread
Image Resize - How to find the stored file name? - by El Forum - 10-04-2010, 11:34 AM
Image Resize - How to find the stored file name? - by El Forum - 10-04-2010, 09:03 PM
Image Resize - How to find the stored file name? - by El Forum - 10-04-2010, 11:24 PM
Image Resize - How to find the stored file name? - by El Forum - 01-24-2011, 10:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB