Jump to content


This topic is now archived and is closed to further replies.


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

Recommended Posts

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)

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.