Hi all...
I am trying to open and edit a txt file which holds php variables to be included in other files. This file resides in my specified include directory (in php.ini) and all the permissions are open. When I use the fopen command on it, I get the error "Warning: fopen('test.txt', 'r+') - No such file or directory"
here is the code and thanx in advance...puzzlin'...
$fileName = 'test.txt';
$fp = fopen($fileName, 'r+', 1);
$contents = fread($fp, filesize($fileName));
$newContents = ereg_replace("currentText","changedText",$contents);
fputs($fp,$newContents);
fclose($fp);
...doesn't work.