+ Post New Thread
Results 1 to 2 of 2
Web Development Thread, Help with PHP in Coding and Web Development; Ok i'm pretty comfortable with PHP but this is getting the better of me. Aim : to create a web ...
  1. #1

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,772
    Thank Post
    873
    Thanked 674 Times in 443 Posts
    Rep Power
    503

    Help with PHP

    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
    Code:
    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..

  2. #2

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,413
    Thank Post
    642
    Thanked 964 Times in 664 Posts
    Blog Entries
    2
    Rep Power
    327

    Re: Help with PHP

    From Tizag:

    Code:
    $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);

SHARE:
+ Post New Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •