I'm building a gaming site, and I need to get some database (not mySQL, please, I can't even get it installed, I'm no PHPist ) where I can have an admin and add a category from it (which would be playstation 2, xbox, etc) and then categories inside those (the games) and in the games, I can add all the cheats, hints & tips, reviews etc from the admin. I just need to be pointed in the right direction. Thanks...
<?php
$filename = 'test.txt';
$somecontent = "Add this to the file\n";
// Let's make sure the file exists and is writable first.
if (is_writable($filename)) {
// In our example we're opening $filename in append mode.
// The file pointer is at the bottom of the file hence
// that's where $somecontent will go when we fwrite() it.
if (!$handle = fopen($filename, 'a')) {
print "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened file.
if (!fwrite($handle, $somecontent)) {
print "Cannot write to file ($filename)";
exit;
}
print "Success, wrote ($somecontent) to file ($filename)";
fclose($handle);
} else {
print "The file $filename is not writable";
}
?>
Adam
"If you’re not using valid HTML, then you haven’t created a Web page. You may have created something else, but it isn’t a Web page." - Joe Clark
Bookmarks