On the problem of buildhtml under thinkphp
I'm a newbie, I don't know a lot of things, huh?
$this->buildhtml (' 1 ', Html_path. /', ' Index ', ' utf-8 ');
The above sentence is what I saw on the internet, it is to use thinkphp to generate HTML but I used, I put ask it, let it execute is a little reaction did not ah, what files are not generated, and then I found on the internet for a long time, are doing me, I do not know why.
This class is automatically generated by the system and is intended for testing purposes only
Class Indexaction extends Action {
Public Function index () {
$this->buildhtml (' 1 ', Html_path. /', ' Index ', ' utf-8 ');
$this->display ();
}
}
This configuration file
Return Array (
' Html_file_suffix ' = '. HTML ',
);
?>
I don't know how to get it, please help me.
PHP thinkphp buildhtml
Share to:
------Solution--------------------
Look at your PHP file naming specification, since others can do, you can not. I think I should find the reason for myself.
------Solution--------------------
I used thinkphp.
Only want to output HTML using $action->display ();
$action->fetch (' template.html ');//returns only results not displayed
If you want to generate something that can be said to save the output to a file, OK.
' Html_file_suffix ' + '. html ', whether this parameter is a pseudo-static suffix or an HTML file suffix I'm not sure why HTML is being generated? is a static HTML file generated?
------Solution--------------------
Html_path, do you have a definition of the output path?
------Solution--------------------
Generally generated pages in the project directory under the HTML directory