FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Smart File Downloader - simple script on xampp
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Smart File Downloader - simple script on xampp [message #175976 is a reply to message #175975] Sat, 12 November 2011 09:20 Go to previous messageGo to previous message
houghi is currently offline  houghi
Messages: 45
Registered: September 2011
Karma:
Member
houghi wrote:
>> What would be my BASE_DIR location if my files that i want downloading
>> are stored in C:\xampp\htdocs\test123
>
> Put a file (e.g. dir.php) in C:\xampp\htdocs\test123:
> <?php echo getcwd(); ?>
>
> Now browse to e.g. http://example.com/test123/dir.php and see what the
> output is. That should probably be what you need to use.

The obvious strength of this script is that you can place the files
outside of your browsable directories.

e.g. I have set it to :
define('BASE_DIR','/tmp/');
/tmp is not browsable from the outside world.

This means that the above solution of dir.php might not work. However
with the filenames, it might look as it would be and it should at least
give you an indication of what to use in all other cases like
C:\not\inside\http.
No idea what it would be if the files would be on D:\files_to_download\

I have also edited the 'date' part in the log to look like what I have
in my other logfiles. I would at least add seconds to the logs.

houghi
--
This is written under the inluence of the following:
> Artist : Philip Glass
> Song : 1962 Body Building
> Album : Mishima
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stats comp.lang.php (last 7 days)
Next Topic: Embedding HTML Within a PHP Statement
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Oct 19 22:24:36 GMT 2024

Total time taken to generate the page: 0.04161 seconds