File downloading problem

#1
[eluser]saad06[/eluser]
Hi,
I am having downloading problem.The files are uploading successfully but when i click on the link to download it gives me the error

Message: file_get_contents(folder/somefile_pdf) [function.file-get-contents]: failed to open stream: No such file or directory.
I don't know why the file name is replaced with "_". Here is my code
Code:
function dpaper($name){
        $name // this name is changed to somefile_ext
        $data=file_get_contents("folder/".$name);
        force_download($name,$data);
        
    }

#2
[eluser]InsiteFX[/eluser]
Try using the full path!

InsiteFX


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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