NYCPHP Meetup

[nycphp-talk] using PHP to create a php file

Nestor rotsen at gmail.com
Wed Jun 7 20:09:45 EDT 2006


I just had a chance to write some php code since 2004 and I am rusty.

My code reads a php file that displays company jobs available.  I read this file
and allow the hr people to check the jobs that they want to remove and then I
proceed to create the new php file without the jobs that were chosen
to be removed.

When I try to write the new php file it fails because it has no
permissions to create
a file in the web directory.  No httpd is being run by use nobody and
the file itself is
own by root.

Error:
Warning: fopen(employment2.phtml): failed to open stream:  Permission
denied in /www/hr_rm_job.phtml  line 11
Cannot create output file.
-----
This is line11:
if (!($out=fopen($outfile,"w")))  die ("Cannot create output file.");


Why can I create php file on this directory?

thanks,

Néstor :-)



More information about the talk mailing list