Zubrag.com
May 21, 2012, 12:33:54 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: downloader  (Read 2590 times)
tehag
Newbie
*
Posts: 2


« on: February 18, 2008, 11:16:15 pm »

Keep getting this:

Warning: opendir(/home/xxxxxx/public_html/downloads/): failed to open dir: No such file or directory in /home/content/x/x/x/xxxxxx/html/download.php on line 95

Warning: readdir(): supplied argument is not a valid Directory resource in /home/content/x/x/x/xxxxxx/html/download.php on line 97
File does not exist. Make sure you specified correct file name.


I have tried every combination I can think of with folders, paths, etc. Always about the same message.

I'm trying to let users download files by clicking on a button. Files and pages are all on the same server, in the same root.

Logged
tehag
Newbie
*
Posts: 2


« Reply #1 on: February 19, 2008, 07:56:01 pm »

Solved: found this code to find the path to the unfindable folder.

<?php

echo(__FILE__)

?>

Save as a .php file in the downloads folder and open it in a browser. Then copy the complete path and paste it into your download.php file on line 22 as define('BASE_DIR','paste here';

In my case the missing part turned out to be /html/ before the public_html/downloads/;

Code works fine now. Thanks Zubrag.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC