On Saturday 04 December 2004 03:30, Rahul S. Johari wrote:
> Did you mean "imsafm2_download/F=imsafm/rahul/somefile.txt" or
> "imsafm2_download?F=imsafm/rahul/somefile.txt"
> The difference being the �?� instead of the �/�
>
> I did actually edited my Apache�s httpd.conf and added the <Files>
> directive. And I modified my code... Right now it still gives the exact
> same error. I�m using �imsafm2_download� instead of �imsafm2_download.php�
> now in my code. It�s working on Mac but not on Windows.. Same error on
> windows. So I do believe I need to do more then just adding that Directive
> to fix this problem.
If you have something like this in your httpd.conf:
<Location /download>
ForceType application/x-httpd-php
</Location>
you can then place a php script with the filename 'download' into your "www
root" directory. Now any request which begins with:
http://www.yourdomain.com/download
will call your 'download' script.
eg:
http://www.yourdomain.com/download
http://www.yourdomain.com/download/file.pdf
http://www.yourdomain.com/download/category1/file.html?file=file.pdf
etc.
So, you can construct a sensible URL and use the variables in $_SERVER to
extract the relevant info required to process your download.
The best way to play with this is to simply have:
<?php phpinfo()l ?>
in 'download', then view it like:
http://www.yourdomain.com/download/put/whateverrubbish/you/want/here
then scroll down to the "PHP Variables" section and see what comes up.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Power is the finest token of affection.
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php