Jump to content


Putting info in a file.. in a certain location?

  • Please log in to reply
1 reply to this topic

#1 Poi

  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 31 March 2006 - 01:48 PM

Hey, i have made a blog script, just for fun, andn it works great but when i go to the add blog page, and fill it out, it puts it into a file called blog.php, and it adds it to the bottom, is there a way i can add it to a specific location?
Welcome! to our site yay!(stays here)

(New content here)

(Old content gets pushed down here)

#2 ober

  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 31 March 2006 - 02:22 PM

This would be waaaaaaaay easier with a database, but you're basically going to have to read the file into an array, shift part of the array, insert the new content in the blank space and write the data back out to the file.

This is why databases exist. This is a very inefficient way to handle this problem.

Info: PHP Manual

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users