Help with opening a file using php

Xenos

Member
Feb 12, 2000
72
0
0
Am a newbie at this thing. To gain access to a particular file I need to force a logon first. I have already completed the login interface in html where a username is required as well as a password and confirm password. I am using simple php code (if there is such a thing) to validate the form then access the file. It just would not bring up the file. Can someone assist me? Here is the last part of that php code and the error I am getting.

PHP Error Message

Warning: fopen(employeeInformation.html) [function.fopen]: failed to open stream: Permission denied in /home/a3634164/public_html/validateLogin.php on line 55

 

Titan

Golden Member
Oct 15, 1999
1,819
0
0
your web server (apache?) might need permission to open the file. Not you, but the web server. Is it world-readable?
 

illvm

Junior Member
May 22, 2009
14
0
0
Make sure that the web server has permissions to read and write (since r+ opens for read/write) to the file. http://www.yolinux.com/TUTORIA...ialManagingGroups.html has a fairly good walk through on how to do this on *nix systems. Under Windows, right click on the file, go to the security tab, and ensure that the group or user that your web server runs under has read, write, and modify permissions to the file.