Reply to Re: newbie question

Your name:

Reply:


Posted by reandeau on 05/31/06 16:46

What you should do is have PHP create the page that contains your
Javascript and applet. Have it load all of the file names from the
text file and store them in a Javascript array. That way you don't
have to reload your page each time you need the next file name. Here
is an example of what the code might look like:

<?php
echo "html and javascript header tags go here";
echo "var imageFiles=new Array()";
//load the file into a Javascript array
$fp = fopen("file.dat", "r");
while (!feof($fp)) {
$lineContent = fgets ($fp, 4096);
echo "imageFiles.push = ('$lineContent')";
}
echo "The rest of your javascript and html code goes here";
?>



Thats about it, let me know how it goes.


Jon Tjemsland

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация