In the later case no database and table is needed. So your page will be loaded fast and help people who use slow connection internet i.e. 3rd world country people. In the following, I am inserting my code and describing so that you can easily understand.
1st Part:
<?php $fp = fopen("files/abc.txt", 'r');
print "<marquee direction=left scrolldelay=2 onmouseover=stop() onmouseout=start() scrollamount=3 onMouseOver=exit>"
?>
[Here abc.txt is a text file that resides under folder "files" in root directory. Text file is read through this command. Marquee direction makes the total file contents moving from right to left and the mouse pointer will be taken upon that line rotation will stop. When mouse pointer will be removed, moving will start again.]2nd Part:
<?php
while (!feof($fp))
{
$line = fgets($fp, 1024);
echo "$line";
}
?>
[A loop goes here from beginning to the end of that file and read every lines one by one.]3rd Part:
<?php
fclose($fp);
?>
[Here by fclose command, the existing file is closed.]
0 comments:
Post a Comment