Posts: 17
Threads: 4
Joined: Aug 2009
Reputation:
0
Thanks for replay i Tired this but got fatal error
Posts: 1.367
Threads: 201
Joined: Apr 2009
Reputation:
24
What kind of fatal error please? What message?
Posts: 17
Threads: 4
Joined: Aug 2009
Reputation:
0
sorry for late actually i was out of town for business purpose
its say fatal error on my ifram page my test forum is ok , may be i put this code on wrong place could u please describe more like where which line under i put this code. actually what i want just registered user can download file from hear cos when i set this script i found many user leching my link and put there site, on this way i also loss my user and bandwidth so is there any modification i can give user restriction on this script with my mybb forum, as a example when a guest user try to download file from this script mybb redirect to log in page
thanks
fuad
Posts: 1.367
Threads: 201
Joined: Apr 2009
Reputation:
24
I'd put it right after the first <?php
in the next line.
If you'd like to have a redirect use this code:
You are not allowed to see php code.
Posts: 17
Threads: 4
Joined: Aug 2009
Reputation:
0
10-17-2009, 06:52 AM
(This post was last modified: 10-17-2009, 06:56 AM by bold_handsome.)
when i use 1st code i got
Direct initialization of this file is not allowed.
Please make sure IN_MYBB is defined.
Fatal error: Call to undefined function error() in my web url/public_html/fuad/download/index.php on line 8
when i use 2nd code i got
Direct initialization of this file is not allowed.
Please make sure IN_MYBB is defined.
Fatal error: Call to undefined function redirect() in my web url/public_html/fuad/download/index.php on line 8
NB:- when i install this script i disable user login system and put it to my test forum as a ifram
Posts: 1.367
Threads: 201
Joined: Apr 2009
Reputation:
24
IN_MYBB is defined in the very first line...
You can't just use this as an iframe, it has to be a stand alone page or included in your script as I mentioned before.
Posts: 1.367
Threads: 201
Joined: Apr 2009
Reputation:
24
Ah, I see.... you wanted to have a script LIKE this script, not a bridge for this AutoIndex script.
I'm sorry for the misunderstanding. My code snippet was to prevent the AutoIndex script from beeing reached by guests.
So you basically wish a script that displays all files inside a folder as downloads on a single page that only MyBB users can access?