二.PHP的数据类型(php学习)

WBOY
Release: 2016-06-23 14:29:34
Original
949 people have browsed it

 

1 、 PHP 基本语法和数据类型:

 

( 1 )、 PHP 基本语法: 

1 、 htm 和 php 混编

2 、一个语句以  ; ( 分号结束 )

( 2 )、 PHP 数据运算 类型

四种标量类型:

boolean (布尔型) 理解为真假型

integer (整型)

float (浮点型,也作 “ double ” ) 理解为小数型

string (字符串)

两种复合类型:

array (数组)

object (对象)  

boolean (布尔型) 理解为真假型

         $bo=TRUE;   $bo=FALSE;

integer (整型)

         $bo= 1;  $bo=-12;

float (浮点型,也作 “ double ” ) 理解为小数型

         $bo= 1.001;  $bo=3.1415926;

string (字符串)

  $bo = “ 这段字符串 or EN Word”;

array (数组)

$bo =array(1,2,3,4);  $bo=array(“A”=>1 , “B”=>2);

 

 

自定义变量首字母定义只能是:_ ,a-z,A-Z开头.
字符串可以使用单引号和双引号,区别在于单引号不能使用(不支持)转义字符.

Linux下设置目录为:777:是最高权限,能读取和写入
设置目录755:只能读取 上传时可以再ftp工具上设置,选择文件-->属性-->数字值.

上传Discuz论坛时请设置上传方式为:二进制.

 

 

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!