Poi Posted March 31, 2006 Share Posted March 31, 2006 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?Blog.php(example):Welcome! to our site yay!(stays here)(New content here)(Old content gets pushed down here) Quote Link to comment https://forums.phpfreaks.com/topic/6267-putting-info-in-a-file-in-a-certain-location/ Share on other sites More sharing options...
ober Posted March 31, 2006 Share Posted March 31, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/6267-putting-info-in-a-file-in-a-certain-location/#findComment-22647 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.