Home >Backend Development >PHP Tutorial >thinkphp Thinkphp's primary notes
Opening words:
To be honest, this is my first time doing a website, so I directly chose the open source framework ThinkPHP. Reasons for choosing this framework. . . I don’t remember anymore
It seems that this was the only one I knew at the time. Other better frameworks were also learned later after completing this graduation project. Thinking about it, I feel that compared to using Java to develop web, I feel that the direct parsability of PHP is more convenient for development and can save me a lot of work = = Then I started to learn PHP by myself (
I left the front end to my classmate, luckily).
Note 1-How to call a method (function) in the Controller class?
place the method (public) in the Public module or itself Model's function.php file, or you can create a new one to call it.
Note 2-The essence of the Html file
such as:
<span>1</span><span><</span><span>include </span><span>file</span><span>="Temp/temp_leftmenu"</span><span>/></span>
<span>1</span><span><</span><span>switch </span><span>name</span><span>="file.type"</span><span>></span><span>2</span><span><</span><span>case </span><span>value</span><span>="dir"</span><span>><</span><span>a </span><span>href</span><span>="{:U('Other/material',array('dir' => urlencode($file['name'])))}"</span><span>></span>{$file['filename']}<span></</span><span>a</span><span>></</span><span>case</span><span>></span><span>3</span><span><</span><span>case </span><span>value</span><span>="pdf|html|jpeg|png|mp4"</span><span>><</span><span>a </span><span>id</span><span>="{:hash('md5',$file['name'])}"</span><span>></span>{$file['filename']}<span></</span><span>a</span><span>></</span><span>case</span><span>></span><span>4</span><span><</span><span>default </span><span>/></span><span>{$file['filename']} </span><span>5</span><span></</span><span>switch</span><span>></span>
This makes me, who is not very familiar with the web, very happy.
Conclusion:
It’s really a long time ago. . . I have forgotten a lot of things, so I will write this much first.
There is really little information online, so the official website documents are of great help to me.
The above introduces the basic points of attention of thinkphp, including the content of thinkphp. I hope it will be helpful to friends who are interested in PHP tutorials.