# PPH Text Editing Errors

**URL:** <https://forum.kirupa.com/t/pph-text-editing-errors/234918>\
**Category:** programming\
**Created:** [August 7, 2007, 6:03am UTC](https://forum.kirupa.com/t/pph-text-editing-errors/234918 "2007-08-07T06:03:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![epoy08](https://avatars.discourse-cdn.com/v4/letter/e/b5a626/32.png) [@epoy08](https://forum.kirupa.com/u/epoy08)\
**Post date:** [August 7, 2007, 6:03am UTC](https://forum.kirupa.com/t/pph-text-editing-errors/234918/1 "2007-08-07T06:03:48Z")

</div>

Hi guys. I’m currently studying PHP language. I already installed IIS on my PC and a PHP server, and test some codes that i found from a tutorial. But there was an error. I can’t determine what was the problem.

This was the code from the tutorial.

```php
<?php
    $today = date("y-m-d");
    $fh = fopen("flat.txt","a");
    fwrite($fh,$today);
    fclose($fh);
    echo "$today";
?>

```

This was the output from my PC.

```auto
07-08-07PHP Warning: fopen(flat.txt) [function.fopen]: failed to open stream:
Permission denied in C:\Inetpub\wwwroot\simple_editor\flat.php on line 3 PHP Warning:
fwrite(): supplied argument is not a valid stream resource in
C:\Inetpub\wwwroot\simple_editor\flat.php on line 4 PHP Warning: fclose(): supplied
argument is not a valid stream resource in C:\Inetpub\wwwroot\simple_editor\flat.php on
line 5 

```

I think there are no problems from the code itself. I think the problem came from my computers security. Can any one help me out.

Thanks in advance.
