一.this
1,要用this,你必有是一个对像的形势,不然它会报错的,Fatal error: Using $this when not in object context。
2,this可以调用本类中的方法和属性,也可以调用父类中的可以调的方法和属性
二.self
1,self可以访问本类中的静态属性和静态方法,可以访问父类中的静态属性和静态方法。
2,用self时,可以不用实例化的
三.parent
1,parent可以访问父类中的静态属性和静态方法。
2,用parent时,可以不用实例化的
——————————————————————————————————
sprintf:把百分号(%)符号替换成一个作为参数进行传递的变量
<?php
$number = 2;
$str = "Shanghai";
$txt = sprintf("There are %u million cars in %s.",$number,$str);echo $txt;?>
——————————————————————————————————(1)$sceneid = input(‘id’, 0); 如果不存在 d 则返回 0
(2)halt( )终止编译,报出哪个文件的第几行出错。
————————————————————————————————
<a href="{:url('shichang/zyl/introduce')}"></a>
这个url方法可以调后端方法