6. Determine whether the file exists and output the content
$FileName="File.TXT";
if (File_Exists($FileName)){
Echo “
”.File_Get_Contents($FileName).””;
}else
{
Echo”no”;
}
?>
7. Uninstall variable unset;
unset($var);
unset($var,$var1);
8.is_int;
Check whether the variable is an integer;
9.is_null;
Check whether the variable is NULL;
10.is_string
Check whether the variable is a string
11.is_real;
Alias for is_float()
12.isset
Check whether the variable is set
13.is_bool
Check whether the variable is of Boolean type
14.is_array
Check whether the variable is an array
15.is_object
Check whether the variable is an object
16.SubStr.
SUBSTR(String,Start,SelectNum)
echo substr(‘abcdef’, 1); // bcdef
echo substr(‘abcdef’, 1, 3); // bcd
echo substr(‘abcdef’, 0, 4); // abcd
echo substr(‘abcdef’, 0, 8); // abcdef
echo substr(‘abcdef’, -1, 1); // f
17.Nb2br
echo nl2br(“foo isn’tn bar”);
Convert escaped newlines into HTML
Original text: http://y312ff.blog.163.com/blog/static/12701109420119119575812/
lazycms::$sysname
This is the first time I see this expression. What does the double colon mean?
Answer:
Methods or properties directly belonging to the class.
That is, the use of static static methods or attributes.
Field operators are generally used to use the properties/methods of class A objects in class B objects!
class c
{
private static $_memory;
public static function autoload()
{
//Method body
}
}
c::$_memory;
c::autoload();
http://www.bkjia.com/PHPjc/477870.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477870.htmlTechArticleRecently, when I was writing a PHP program, I discovered some special PHP symbols, such as the continuous less than symbol and three less than symbols. ,eot,eod,echo examples,print examples, etc. Suddenly I found that I have been using PHP for so long...