I am using the PHP command
Is there a way i could set up filename.txt so it could be moddified from a .PHP or .HTML file? I have it set to 777 i just need a little help. I would rather NOT use a MySQL database.<?
readfile("filename.txt");
?>
I am using the PHP command
Is there a way i could set up filename.txt so it could be moddified from a .PHP or .HTML file? I have it set to 777 i just need a little help. I would rather NOT use a MySQL database.<?
readfile("filename.txt");
?>
I'm not exactly sure what you want to do. If you mean modify the txt through another string of commants from another script, try fopen.
http://www.tizag.com/phpT/files.php for a fairly involved tutorial.
I'd like to point out that mysql is very easy and I'm pretty sure it is much more efficiant (although I'll need someone to confirm that) than this alternate method. It will also take up less space on your cPanel
Efficient I can vouch for, and it'd also be a hell of a lot easier than trying to modify a file on-the-go (plus it isn't heavy on system resources - KEY for free hosting since high resource usage gets you suspended).
If you're only writing to it once though then go ahead, but if it's something like a forum or anything where it'll get modified frequently, I'd look up some MySQL stuff cause it won't tax your system as much, and it's WAY easier than using files.
TOS breakers will be suspended regardless of race, creed, national origin, hair color, or favorite food. Thanks for your understanding!