file outside public_html

L

Leszek

Hi.
Is it possible to pass to a script a path to a file which is outside
public_html?

I have this function :

function okno( film ){
gora = screen.height/2-315;
lewy = screen.width/2-350;
oknoFilm =
window.open(film,'oknoFilm','menubar=no,location=no,toolbar=no,scrollbars=no,status=no,resizable=yes,width=700,height=630,left='+lewy
+',top='+gora +'');
oknoFilm.focus();
}

film should be a path to html file...

but when later i'm trying to call
okno('/home/ab17661/domains/szachy.biz/filmy/film2.html');
but i'm getting IE error "file not found"

When the file was in public_html folder
okno('filmy/film2.html');
was working fine

I need to make sure that only registered users will access this file that's
why i put it outside public_html

Could you help me?

Thanks.
Leszek
 
B

bobzimuta

Leszek said:
Hi.
Is it possible to pass to a script a path to a file which is outside
public_html?

That invalidates the purpose of a web server. Your script (or any
agent) requests files from the server. If the file is not within the
domain of publicly available files specified to the server, you're SOL.

Rather, you need to implement some kind of user authentication (basic,
digest, ip restriction, custom server-side script and database) that
prevents unauthorized users from accessing the content.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top