On the related problems of buildhtml under thinkphp

Source: Internet
Author: User
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
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.