0

My question we have file handling in php.In file handling we have create file,write file and update file.if i create the text file using php file handling and write into the file some Hello guys and close the file.I want to update the file but this time while update file i want to add the text in between Hello and guys.For example Hello hii guys.or guys word will be overwrtten by speed.Hello speed.

thanks please help me

3
  • before saving manipulate the text..whats the issue ?? Commented Apr 9, 2013 at 5:19
  • if i update the text file using php new text always written over end of the file not in between which i want Commented Apr 9, 2013 at 5:21
  • Is it always going to be "Hello guys", or you just want to throw text in between two totally random works? Commented Apr 9, 2013 at 5:31

2 Answers 2

1

you can append text at last using below link or any other option http://php.net/manual/en/function.file-put-contents.php

Sign up to request clarification or add additional context in comments.

Comments

0

That is not possible even in any language, you have to read file in buffer then do changes as you want and after that write down in file. On the other hand You can append text at last.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.