July 25, 200818 yr im wanting to include a txt file into a section of my site. This section is already styled in css all i require is some text including from an out side souce but randomly. for example include txt1 or tx2 or txt3. i have 6 txt files containing nothing but text, i want my site to import one of these txt files randomly and include it in the site. how can i do this??
July 25, 200818 yr Have a go with this. <? /* Directory Structure /index1.html /index2.html /index3.html /index4.html /index5.html */ srand((double)microtime()*1000000); $num = rand(1,5); include ('index'.$num.'.html'); ?>
Create an account or sign in to comment