S
S
Spaceoddity2018-03-25 13:00:53
PHP
Spaceoddity, 2018-03-25 13:00:53

How to properly generate html file via PHP?

There is no need to sculpt some kind of template engine. You just need to make a finished document from a bunch of small html files. This is for ease of editing (the file itself is very large).
So, what is the best way to do this?
I'm currently outputting via file_get_contents/echo. But maybe according to the Orthodox it is necessary through some ob_start?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Stalker_RED, 2018-03-25
@Stalker_RED

php.net/manual/en/function.include.php

S
SagePtr, 2018-03-25
@SagePtr

If you need to stupidly copy the contents of a file to the output buffer, you can use the readfile function .

D
Danil Sapegin, 2018-03-25
@ynblpb_spb

IMHO, file_get_contents/echo is enough

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question