| | |
Text Fader
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2008
Posts: 3
Reputation:
Solved Threads: 0
Hi please help me,I am kind of new at php.
This is what i have to do please ,provide me with a code if some one can
1)I have files named like 10.txt,9.txt,7.txt etc..//only text files
2)higher the number of the file hisger the priority
3)i just want to use php to read from each file and display it on screen eg... say i am reading from 10.txt then i will display the text of 10.txt on screen say for 100 seconds....
then this fades away and i display the text of 9.tx for 90 seconds ...
and so on and after the last file is read the process repeats again.....
the code to do so from ajax and javascript is very dirty and i can not understand much
Please provide a php solution to this??
This is what i have to do please ,provide me with a code if some one can
1)I have files named like 10.txt,9.txt,7.txt etc..//only text files
2)higher the number of the file hisger the priority
3)i just want to use php to read from each file and display it on screen eg... say i am reading from 10.txt then i will display the text of 10.txt on screen say for 100 seconds....
then this fades away and i display the text of 9.tx for 90 seconds ...
and so on and after the last file is read the process repeats again.....
the code to do so from ajax and javascript is very dirty and i can not understand much
Please provide a php solution to this??
This is not possible with PHP without using some other language as well, PHP is a server-side scripting language and does not control how the text is displayed, this is dealt with by the HTML/CSS/javascript.
PHP can open the files and display the contents of them, but to move to the next file without reloading the page will require AJAX or at least some form of JavaScript
PHP can open the files and display the contents of them, but to move to the next file without reloading the page will require AJAX or at least some form of JavaScript
Last edited by Will Gresham; Oct 5th, 2008 at 7:06 pm.
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
To get a list of files in a directory, look into the
This is the starting point, for assistance in Javascript there is a specific forum on here for that.
opendir() readdir() and closedir() functions in PHP, to get the contents of the files, look at the fopen() fread() and fclose() This is the starting point, for assistance in Javascript there is a specific forum on here for that.
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
![]() |
Similar Threads
- mac vs windows; help to resolve the problem (HTML and CSS)
Other Threads in the PHP Forum
- Previous Thread: urgently need help.....pliz...
- Next Thread: Code works with Mozilla, but not with other browsers...
| Thread Tools | Search this Thread |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube






