Page 1 of 1

Displaying folder contents

Posted: Thu Jun 07, 2012 6:55 pm
by AndyF
Script URL: www.thefletchers.co.uk/guestbook
Version of script: 1.7
Hosting company: 1and1
URL of phpinfo.php: www.thefletchers.co.uk/guestbook/phpinfo.php
URL of session_test.php: www.thefletchers.co.uk/guestbook/session_test.php
What terms did you try when SEARCHING for a solution: Read through each post and trawled Google

Write your message below:
The guestbook works fine, but I have noticed that users could directly type in the address of the (for example) banned_ip.txt, or entries.txt

Is there a way within the program that I can prevent the listing of these ?

Re: Displaying folder contents

Posted: Thu Jun 07, 2012 8:12 pm
by Henrie
For the file entries.txt you can edit the settings.php file. Change the entries.txt entry in the following part

Code: Select all

/* Name of the file where guestbook entries will be stored */
$settings['logfile']='entries.txt';
Also change the name of the file on your server to the same name.

For the banned_ip.txt file there is no such setting. But I think it is not important to hide it as it contains no possible private information.

Greetings,
Henrie