Welcome Guest, Not a member yet? Register   Sign In
get uploaded file path
#1

[eluser]Mohammed Zayan[/eluser]
hi,
I want to save the uploaded file path in the database
but I don't know how can I get the path
Someone help me, please.
#2

[eluser]Glazz[/eluser]
If you are using the file uploading class, after you upload your file you use this
Code:
$data = array('upload_data' => $this->upload->data());
echo $data['full_path'];

I think it is this what you want.
#3

[eluser]Mohammed Zayan[/eluser]
this what I have after I do this code

A PHP Error was encountered

Severity: Notice

Message: Undefined index: full_path

Filename: controllers/books.php

Line Number: 88
#4

[eluser]Glazz[/eluser]
Ups my bad, i copied from the User Guide and i didn't looked at what the code was doing.

Try this:
Code:
$data = $this->upload->data();
echo $data['full_path'];
#5

[eluser]Mohammed Zayan[/eluser]
It works, Thank you so much




Theme © iAndrew 2016 - Forum software by © MyBB