+ Reply to Thread
Results 1 to 3 of 3

Thread: PHP Help

  1. #1
    Join Date
    Oct 2007
    Location
    IN YOUR FACE
    Posts
    341

    PHP Help

    I am using the PHP command
    <?
    readfile("filename.txt");
    ?>
    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.

  2. #2
    taekwondokid42 is offline x10 Lieutenant taekwondokid42 is an unknown quantity at this point
    Join Date
    Aug 2007
    Posts
    268

    Re: PHP Help

    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

  3. #3
    Livewire's Avatar
    Livewire is offline Abuse Compliance Officer Livewire is a glorious beacon of lightLivewire is a glorious beacon of light
    Join Date
    Jun 2005
    Location
    Behind a keyboard.
    Posts
    8,998

    Re: PHP Help

    Quote Originally Posted by taekwondokid42 View Post
    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!

+ Reply to Thread

Similar Threads

  1. tons of PHP Resources
    By Chris S in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 01-16-2009, 10:07 AM
  2. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM
  3. Sigo con problemas con phpbb2
    By reciecho in forum Soporte
    Replies: 7
    Last Post: 10-20-2007, 06:28 PM
  4. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers