This option will reset the home page of this site. Restoring any closed widgets or categories.

Reset

Reading file using php

Simple php code for reading lines
Using the below PHP code you can easily read a txt file
< ?php
$file = fopen("mistonline.in.txt", "r") or exit("Unable to open file!");
//Output of the text file
while(!feof($file))
  {
//<br> is used to break b/w lines

  echo fgets($file). "<br />";
  }
fclose($file);
?>
VN:F [1.5.7_846]
Rating: 8.5/10 (4 votes cast)
VN:F [1.5.7_846]
Rating: -1 (from 1 vote)

Related posts:

  1. Append data to a text file using php
  2. Hit counter using php
  3. Locking a text file database using php
  4. Simple file upload script using php
  5. Simple XML Reading Using PHP
  6. Getting Remote Webpage Info Using PHP

3 Comments

  1. bjhbjj says:

    nice

    VA:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.5.7_846]
    Rating: -1 (from 1 vote)
  2. wow, but how about if i want to read the file and add some record without any loss of data,..? thanks in advance

    VA:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.5.7_846]
    Rating: -1 (from 1 vote)
  3. admin says:

    Jeremy thanks again for your response
    Follow this link, it will be helpful and will clear your doubt i guess.

    VN:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.5.7_846]
    Rating: 0 (from 0 votes)

Leave a Reply

Comments (required)

Spam Protected