views:

131

answers:

3

I am trying to create a news ticker for a website that reads in the contents of a folder, where each file in the folder would hold a news update, and I am trying to do this without having to manually create 10 different Iframes for each individual file, and having to keep files names etc. the same.

Is this possible, and if so how is it done?

Thanks for the help

The software I am working with is Dreamweaver CS4

A: 

Take a look at php's file_get_contents. You could create a single php page that read all of the other pages and outputted their combined input.

Edit: My php is a bit rusty, but you could try:

$output = "";
$files = array('file1.txt', 'file2.txt', 'file3.txt', ... );
foreach ($file as &$f) {
    $output .= file_get_contents($f);
}
echo $output;
Chris Pebble
There is no need to make array(1 => ...). Just use array(...).
Pedro Cunha
is it possible to do this with a folder that is outside of the server
@Pedro Cunha, thanks! Changed to reflect.
Chris Pebble
@John of course, it's possible.
fabrik
A: 

This is the basis of the MoveableType blogging software. I would recommend that you install MoveableType, rather than trying to roll your own solution.

anschauung
A: 

Would this not be easier in the "long run" if you put your "updates" into a mysql database, and create a php script that would look for updates to display?

chutsu