OK Ive writin some code that opens a file then inserts a string.. then if ran again will delete the file recreate it then add the new string... this may not be the best way but anyways it is working on one machine but not on another.
unlink("create.txt");
//sleep(2);
touch("create.txt");
sleep(2);
$filename = 'create.txt';
$somecontent = "aname=".$_REQUEST[aname]."&hip=".$_REQUEST[host_ip]."&dname=".$_REQUEST[dname]."&dpass=".$pass_it."&duser=".$_REQUEST[db_user]."&table=".$_REQUEST[db_table]."&ext=".$_REQUEST[db_ext]."&thumb=".$thumb."&image=".$image."&base_path=".$base_path;
// Let's make sure the file exists and is writable first.
if (is_writable($filename)) {
if (!$fp = fopen($filename, 'a')) {
print "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened file.
if (!fwrite($fp, $somecontent)) {
print "Cannot write to file ($filename)";
exit;
}
fclose($fp);
now I get a error message like this...
Cannot open file (create.txt)
Does it not have full write access?
-Thanx