PDA

View Full Version : Including a file within the vB template


zanis
11-06-2008, 06:43 PM
Hello all,

I have created a Scheduled Task that generates a file within the file system that contains HTML that I would like presented on the forum.

I was wondering how I could execute the following logic on the forum templates - for example the forum home template.

1) Check if the file exists
2) If file exists set custom cookie
3) Include the file/contents where this code is executing (include() ?)

The file is text based and contains production ready HTML.

Cheers

marc

--------------- Added 1226019241 at 1226019241 ---------------

HEllo all,

I have found the answer:

$includedhtml = implode('', file('path/to/this/file/myfile.html'));

Cheers

Marc