• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Download document after uploading files


I have uploaded some files in my specified path using codeigniter now i have to download files from same path. how to use in download function(plugins) in codeigniter


i have used

$path = "/the/path/to/your/file";
$data = file_get_contents($path); // Read the file's content
$name = "MyFileName";
force_download($name, $data);

but error showing like this
A PHP Error was encountered

Severity: Warning

Message: file_get_contents( [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found

Filename: controllers/buynote.php

Line Number: 71

how can i solve this error

my path is correct am sure that

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.