Need help to output my script to a html file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Joethepoe
Forum Newbie
Posts: 4
Joined: Thu Aug 06, 2009 6:51 pm

Need help to output my script to a html file

Post by Joethepoe »

This will probably seem confusing, I'll try to make it clear. I have this script of an imageboard I have writ. It's not finished yet but you can post and reply. Here's what I need to do. At the moment it views all the threads using a function, but I want to display a html file instead of the php file. So when a thread is created the php file will run, create the thread, then update the html file page with that new thread along with the other threads. Like it does at the moment but with a html file not php. Also I don't want to use URL re writing either and if i choose to use fwrite() I'll have to rewirte the whole script without using while loops. And If I output buffer method the php file would have to show the threads first, then copy it to the html file, then refresh to the html file, which kinda ruins the point.

Any way heres my script, the file to open is myib4.php.
You will also need to create a database called hello and a table called hhh (it has to be called this for now)
Here's the table structure:
no int not null auto_increment,
now text,
name text,
email text,
sub text,
com text,
host text,
pwd text,
ext text,
w int,
h int,
tim text,
time int,
filemd text,
originalfile text
fsize int,
root timestamp,
thread int
Joethepoe
Forum Newbie
Posts: 4
Joined: Thu Aug 06, 2009 6:51 pm

Re: Need help to output my script to a html file

Post by Joethepoe »

I have just realised, the php doesn't output anything untill the end of the script so if the last line refreshes to the html file then the php file will never output anything
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Need help to output my script to a html file

Post by jackpf »

Wait...what?

Do you mean you want to append new posts to the bottom of the file?
Post Reply