fopen function is not working in php.
I wrote the following code in my php file.
$fh = fopen("/home/sugumar/Public_html/sugumar/public_html/123","a+");
fwrite($fh,"hello");
I ran this code from command line: php file_name.php its working fine. But If I run this code from browser it shows the following error.
Warning: fopen(Logs/add_employee.logs) [function.fopen]: failed to open stream: Permission denied in /home/sugumar/Public_html/sugumar/public_html/HRMS/HRMS_add_emp_DB.php on line 111
Warning: fwrite(): supplied argument is not a valid stream resource in /home/sugumar/Public_html/sugumar/public_html/HRMS/HRMS_add_emp_DB.php on line 113
how to solve this problem?
Thanks in advance.