Welcome Guest, Not a member yet? Register   Sign In
Another simple Upload Class question
#1

[eluser]thesocialhacker[/eluser]
Why can't I get "file_name" out of this...?
Code:
$upload_data = array('upload_data' => $this->upload->data());

Unindexed Array, file_name not found... I can't simply use $upload_data['full_path'] or $upload_data['file_name'] or any of them, for that matter- I'm using the example code found on the CI site (http://ellislab.com/codeigniter/user-gui...ading.html)

Code:
Array ( [upload_data] => Array ( [file_name] => pseudo-vector8.jpg [file_type] => image/jpeg [file_path] => /public_html/beatjunkie/code/frontend/thesocialhacker/ [full_path] => /public_html/beatjunkie/code/frontend/thesocialhacker/pseudo-vector8.jpg [raw_name] => pseudo-vector8 [orig_name] => pseudo-vector.jpg [client_name] => pseudo-vector.jpg [file_ext] => .jpg [file_size] => 5.63 [is_image] => 1 [image_width] => 80 [image_height] => 123 [image_type] => jpeg [image_size_str] => width="80" height="123" ) )
#2

[eluser]thesocialhacker[/eluser]
here is the actual err:
Code:
A PHP Error was encountered

Severity: Notice

Message: Undefined index: file_name

Filename: controllers/upload.php

Line Number: 54

line 54 is where I use $upload_data['file_name'];
#3

[eluser]thesocialhacker[/eluser]
duh,
Code:
$upload_data = $this->upload->data();
instead of building the array() to $data... thanks anyway Wink




Theme © iAndrew 2016 - Forum software by © MyBB