Welcome Guest, Not a member yet? Register   Sign In
How to view an existing document?
#4

(This post was last modified: 03-11-2020, 09:05 AM by christaliise.)

(03-10-2020, 08:03 AM)includebeer Wrote: What do you want to do with the file? If you just need to display it in a view, you only need a href link. No need to call fopen.

Thanks @includebeer a simple href link did the job.

(03-10-2020, 08:00 AM)InsiteFX Wrote: For one the view needs to be the last thing that you load.

You want to do something like the below code:

PHP Code:
$data['photo'] = 'c:\xampp\user\photos\user.jpg';
$data['docs']  'c:\xampp\user\docs\userdoc.ext';

$this->load->view('view_name'$data); 

Then in your view file just echo out $photo and $docs where you want them.

Thanks @InsiteFX Im trying to avoid using the database & I do prefer @includebeer's simpler solution. However I may need your idea somewhere else in my project.
Reply


Messages In This Thread
RE: How to view an existing document? - by christaliise - 03-11-2020, 09:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB