烟台南山学院 PHP 程序设计实验指导书
2. APACHE 的安装和配置.................................................................................................................................................5
2.1 安装软件....................................................................................................................................................................5
2.2 配置服务....................................................................................................................................................................5
3. APACHE : WEB 服务的安装和启动.............................................................................................................................6
4. 测试 APACHE 服务器对 PHP 的支持能力..................................................................................................................6
5. MYSQL 的安装和启动数据库服务器...........................................................................................................................7
6. 测试 PHP 与 MYSQL 的协同........................................................................................................................................7
实验二 PHP 基本语法实验................................................................................................................................................8
0 实验准备...........................................................................................................................................................................8
0.1 实验环境和相关工具软件........................................................................................................................................8
0.2 实验目的和内容........................................................................................................................................................8
0.3 实验中的约定............................................................................................................................................................9
1 词法结构...........................................................................................................................................................................9
1.1 大小写敏感................................................................................................................................................................9
1.2 语句和分号..............................................................................................................................................................10
1.3 注释..........................................................................................................................................................................11
1.4 标识符(常量标识符)..........................................................................................................................................11
2 数据类型.........................................................................................................................................................................12
2.1 字符串......................................................................................................................................................................12
2.2 布尔型......................................................................................................................................................................12
2.3 数组型......................................................................................................................................................................13
2.4 对象型......................................................................................................................................................................14
2.5 资源型......................................................................................................................................................................14
2.6 数据类型的检测......................................................................................................................................................16
3 变量.................................................................................................................................................................................17
3.1 变量的变量..............................................................................................................................................................17
3.2 变量的作用域..........................................................................................................................................................18
3.3 垃圾收集..................................................................................................................................................................20
4. 表达式和操作符............................................................................................................................................................23
4.1 隐式类型转换..........................................................................................................................................................23
4.2 字符串连接操作符..................................................................................................................................................24
4.3 自增自减操作符......................................................................................................................................................24
4.4 类型转换操作符......................................................................................................................................................25
4.5 其他操作符..............................................................................................................................................................26
5.流控制语句.....................................................................................................................................................................26
评论0
最新资源