上一页 1 2 3 4 5 6 7 ··· 31 下一页
摘要: <?php // 空值 // 声明但没有赋值 $username; var_dump($username); //声明但赋值为null $passwoed =null; var_dump($passwoed); //通过unset()函数销毁的变量 $age =19; unset($age);//销 阅读全文
posted @ 2020-03-11 22:30 lujieting0 阅读(104) 评论(0) 推荐(0) 编辑
摘要: <?php // 数组(一组相关数据的容器) $arr = ['Tom',26,'男',false,8000,'本科','河南省']; echo '姓名:',$arr[0],'<br>'; echo '年龄:',$arr[1],'<br>'; echo '学历:',$arr[5],'<br>'; 阅读全文
posted @ 2020-03-11 22:28 lujieting0 阅读(132) 评论(0) 推荐(0) 编辑
摘要: <?php // NowDOC案例 $title ='title'; $boby = '<h1>Hello world</h1>'; $html = <<<'EOT' <!DOCTYPE html> <html lang="en"> <head> <meta charset = "UTF-8"> 阅读全文
posted @ 2020-03-11 22:25 lujieting0 阅读(91) 评论(0) 推荐(0) 编辑
摘要: <?php // 1.获取提交的数据 $username = $_POST['username']; $password = $_POST['password']; $password2 = $_POST['password2']; $email = $_POST['email']; $sex =  阅读全文
posted @ 2020-03-11 22:22 lujieting0 阅读(88) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2020-03-11 22:21 lujieting0 阅读(438) 评论(0) 推荐(0) 编辑
摘要: <?php // 因为双引号内变量可以被解析,所以可通过花括号语法将变量名称括起来,以防止PHP引擎获取更多的字符; $username='Tom'; echo "<p>username is:{$username}s</p>"; echo "<p>username is:${username}s< 阅读全文
posted @ 2020-03-11 22:19 lujieting0 阅读(115) 评论(0) 推荐(0) 编辑
摘要: <?php //变量 $userId=5;//整型 $username="Tom" ;//字符型 $password='12345';//字符型(不参加数字运行的数字要归为字符型,如手机号、qq号等) $age=26;//整型 $sex=true;//布尔型(true表示男) $salary=789 阅读全文
posted @ 2020-03-11 22:17 lujieting0 阅读(81) 评论(0) 推荐(0) 编辑
摘要: <?php // HereDOC案例 $title ='title'; $boby = '<h1>Hello world</h1>'; $html = <<<CDATA <!DOCTYPE html> <html lang="en"> <head> <meta charset = "UTF-8"> 阅读全文
posted @ 2020-03-11 22:04 lujieting0 阅读(65) 评论(0) 推荐(0) 编辑
摘要: <?php $arr = ['C','D','E']; echo '原数组有', count($arr), '个成员'; echo '他们是:', implode(',',$arr); $length = array_unshift($arr,'A','B'); echo '现有',$length, 阅读全文
posted @ 2020-03-11 22:02 lujieting0 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1.什么是PHPPHP(hypertext preprocessor),超文本预处理器 2.PHP能做什么a.命令行脚本b.服务器脚本(最主要功能)c.桌面应用程序 3.PHP的工作原理a.客户端向服务器发送HTTP请求b.服务器接收请求后,将请求转发给PHP引擎c.PHP引擎接受并处理请求d.PH 阅读全文
posted @ 2020-03-11 21:59 lujieting0 阅读(242) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 31 下一页