how to hide jpeg from directory

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nickjonnes
Forum Newbie
Posts: 2
Joined: Thu Mar 10, 2011 3:04 am

how to hide jpeg from directory

Post by nickjonnes »

hey all,
i have an issue, i have a directory site called hackingtoolz.tk and if you go to it, you will see a list of folders as it is just a directory the problem is how to i stop the banner from apearing in the directory.
i have tried changing the chmod to 4000 and that just made the jpeg stay their and the banner screw up
if you go to the site you will understand what i mean better
hope you can help
cheers nick
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: how to hide jpeg from directory

Post by pickle »

Make the file not readable by your web user.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
nickjonnes
Forum Newbie
Posts: 2
Joined: Thu Mar 10, 2011 3:04 am

Re: how to hide jpeg from directory

Post by nickjonnes »

what?
how you do that?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: how to hide jpeg from directory

Post by pickle »

Hmmm, after re-reading your post - my suggestion won't fix anything. You could change the permissions so Apache can't read the file...but then Apache won't be able to read the file when it's outputing it in the page. I think the best solution would be to segregate any site files (css, that image, etc) outside the directory you're listing up to users.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply