Welcome Guest, Not a member yet? Register   Sign In
Retrieve data from .txt file and put into textbox
#1

[eluser]phparif[/eluser]
I have two text file(title.txt, notice.txt), I want, the contents of title.txt file put into a textbox and the contents of notice.txt put into textarea. But when i run my view file the contents of two file show upper portion of my page(unexpected) and number of character show in textbox & textarea.

Now how can i retrieve data from .txt file and put into textbox and textarea by CI & what is my error. Please help me.

My code is here :http://codepad.org/3VmvgYsI
#2

[eluser]CroNiX[/eluser]
readfile() outputs to the output buffer.
Try:
Code:
$data['title'] = file_get_contents(urlencode(base_url("title.txt")));
#3

[eluser]phparif[/eluser]
Now it works. Many many thanks..............




Theme © iAndrew 2016 - Forum software by © MyBB