thinkphp primary note, thinkphp beginner _php Tutorial

Source: Internet
Author: User

Thinkphp primary point of attention, thinkphp Primary


Opening words:

website, to tell the truth, is the first time to do, also directly selected thinkphp this open source framework. The reason for choosing this framework ... I don't remember.

It seems that there is only this in my cognition at the time, and the other better framework is the graduation design to understand later. Think of it, is that the relative

To use Java to develop the web, I feel that the direct and resolvable PHP is more convenient for development, can save me a lot of work = = then began to self-taught PHP road (

The front end I gave my classmate, fortunately).

Note Point 1-How do I call a method (function) in a controller class?

At the beginning of the development of the time according to their own previous object-oriented understanding, the method is placed in the controller directly called, and then found that it is not possible, it must be

Place the method (common) in the public module or in the function.php file of its model, or you can create a new one to invoke.

Note the essence of the 2-html file

thinkphp framework, since the framework itself will parse the HTML file, this will allow you to customize the label, you can use , and so on tags

Such as:

1 <  file= "Temp/temp_leftmenu"/>
1 <Switchname= "File.type">2     < Casevalue= "dir"><ahref= "{: U (' other/material ', Array (' dir ' = UrlEncode ($file [' Name '])}")} ">{$file [' filename ']} 
    a> case 
     >3< case value = "Pdf|html|jpeg|png|mp4" >< a ID = "{: hash (' MD5 ', $file [' Name '])}" > {$file [' filename ']}  
      a> case 
       >4<Default  />{$file [' filename ']}5  switch>      
        
 

This makes me happy with people who aren't familiar with the web.

Conclusion:

It was a bit long ago ... A lot of things forget, write so much first.

This online information is very small, so the official website documents for my help very much.

http://www.bkjia.com/PHPjc/1139057.html www.bkjia.com true http://www.bkjia.com/PHPjc/1139057.html techarticle Thinkphp's primary attention point, thinkphp primary opening words: website, to be honest, is the first time to do, also directly selected thinkphp this open source framework. The reason for choosing this framework ... ...

  • 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.