PHP will not allow me to create new files that are unlocked?!



Hi everyone

i'm trying to setup my website to create new webpages dynamically using

php but I am having a major problem in that whenever i create a file it

is always created locked so that it can only be read even when i
specify read and write access.

Here is a basic example of the code I am using (I am using a Mac OSX
10.3.9):

<?php

$filename = '/Users/myusername/sites/mysitefolder/newfile.php';
$mytext = 'my text';

fopen($filename, 'w+');
fwrite($filename, $mytext);
fclose($filename);

?>

When i run this program all it does is create a blank file with
read-only access. My question is does anyone know what is causing might
be causing this? Can anyone suggest possible solutions? I have made
sure that all the subfolders allow read write access to all and still
no luck.

.



Relevant Pages

  • Creating files using fopen that are unlocked!
    ... i'm trying to setup my website to create new webpages dynamically using ... php but I am have a major problem in that whenever i create a file it ... read-only access. ...
    (comp.lang.php)
  • Re: Web Animation and Sound Advice Sought
    ... upon someone landing on my website, ... My blog program is a php program that makes use of a mysql database. ... linux (and the linux server supports all sorts of php). ... $500+ Premiere software -- at least on my first brief experimenting ...
    (misc.writing)
  • Re: Furthering my education in OOP - where/how can one learn professional skills?
    ... but I am not proud of the rather amateurish ... implement them in a website. ... is PHP the best language to use to learn and implement the full ... power of OOP? ...
    (comp.lang.php)
  • Re: Best (most Borland-like) PHP IDE+Debugger?
    ... existed before Borland quit trying to compete with M$'s VisualC. ... Is there anything like it for PHP? ... But it has no debugging capability. ... Manuel's ONLY answers to questions are to see something on his website - and he never identifies it as his website. ...
    (comp.lang.php)
  • Re: Securing PHP
    ... Does anyone here run a website of their own? ... hits with ads that you run through Google AdSense? ... What does any of this have to do with PHP? ... Yes I see a couple of spam posts get through to comp.lang.python every ...
    (comp.lang.php)