cannot edit any php files using specific functions

Posted by user458474 on Stack Overflow See other posts from Stack Overflow or by user458474
Published on 2013-10-22T15:44:01Z Indexed on 2013/10/22 15:54 UTC
Read the original article Hit count: 343

Filed under:
|
|

I cannot update any txt files using php. When I write a simple code like the following:

<?php 

// create file pointer 
$fp = fopen("C:/Users/jj/bob.txt", 'w') or die('Could not open file, or fike does not                exist and failed to create.'); 

$mytext = '<b>hi. This is my test</b>'; 

// write text to file 
fwrite($fp, $mytext) or die('Could not write to file.'); 
$content = file("C:/Users/jj/bob.txt");


// close file 
fclose($fp); 

?>

Both files do exist in the folder. I just cannot see any updates on bob.txt.

Is this a permission error in windows? It works fine on my laptop at home. I also cannot change the php files on my website, using filezilla.

© Stack Overflow or respective owner

Related posts about php

Related posts about permissions