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

P Yurt pyurt at
Wed Jun 7 21:10:08 EDT 2006

Is this on *nix? If so try permission 777 for the folder.

Paul Yurt pyurt at 480-585-0007

-----Original Message-----
From: talk-bounces at
[mailto:talk-bounces at] On
Behalf Of Nestor
Sent: Wednesday, June 07, 2006 5:10 PM
To: NYPHP Talk
Subject: [nycphp-talk] using PHP to create a php file

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

My code reads a php file that displays company jobs available. 
I read this
and allow the hr people to check the jobs that they want to
remove and then
proceed to create the new php file without the jobs that were
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.

Warning: fopen(employment2.phtml): failed to open stream: 
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

Why can I create php file on this directory?


Néstor :-)
New York PHP Community Talk Mailing List
New York PHP Conference and Expo 2006
Show Your Participation in New York PHP

More information about the talk mailing list