Gatt Posted November 14, 2006 Posted November 14, 2006 Ok i'm pretty comfortable with PHP but this is getting the better of me. Aim: to create a web page that allows end-user to append a domain url (eg: example.com) to a dansguardian blocklist I have a perl script that does it, and can suss how to pass data from a textbox in PHP, and know to use fopen("FILENAME", "a+") to open a file to append data to the end of it. However this isn't happening nor do i know the correct coding structure to achieve this..
webman Posted November 14, 2006 Posted November 14, 2006 From Tizag: $myFile = "testFile.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); $stringData = "New Stuff 1\n"; fwrite($fh, $stringData); $stringData = "New Stuff 2\n"; fwrite($fh, $stringData); fclose($fh);
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now