标签:访问 index.php tle ext round add oba ++ meta
1.php内可以书写html 代码
2.php传输方式 为 $_GET,$_POST,$_REQUEST 三种方式
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>php</title>
</head>
<body>
<form action="index.php" method="post">
<input type="text" name="user"><br>
<input type="submit" value="提交"> //一定要是 submit 类型,否则将报错
</form>
<?php
echo $_POST["user"];
?>
</body>
</html>
3.全局变量
$var = 15; function add() { GLOBAL $var; $var++; print "var is $var"; } add();
4. 字符连接用 .,对象访问:obj->name
5.php 的Array类似与对象
标签:访问 index.php tle ext round add oba ++ meta
原文地址:http://www.cnblogs.com/haigui-zx/p/6912136.html