Home  >  Article  >  Backend Development  >  thinkphp file reference and branch structure usage examples, _PHP tutorial

thinkphp file reference and branch structure usage examples, _PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:12:56921browse

thinkphp file reference and branch structure usage examples,

The examples in this article describe the use of thinkphp file references and branch structures. Share it with everyone for your reference. The specific analysis is as follows:

1. Import CSS and JS files

1. css link:

Copy code The code is as follows:

js src:

Copy code The code is as follows:

2. import

Copy code The code is as follows:
//Import the Public folder In the test.js file in the Js directory below, the import tag can omit the type attribute. The default is js's
//The default is the Public folder
//You can change the default folder and set the basepath attribute

3. load

Copy the code The code is as follows:
//The method can automatically detect the imported file type

2. Branch structure

1. if

Copy code The code is as follows:

Men are made of mud

Women are made of water


Underage

Youth

Adult


Supplement:
> gt
< ltlt
== eq
<= elt
>= egt
!= neq
=== heq
!== nheq

2. switch

Copy code The code is as follows:
//Remove the $ sign from the variable in the loop
A monk carries water to eat
Two monks eating Taiwan water
Three monks have no water to eat
Here is the default value

I hope this article will be helpful to everyone’s ThinkPHP framework programming.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/917676.htmlTechArticlethinkphp file reference and branch structure usage examples. This article describes the thinkphp file reference and branch structure usage examples. Share it with everyone for your reference. The specific analysis is as follows: 1. Import...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn