-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·92 lines (66 loc) · 1.28 KB
/
index.php
File metadata and controls
executable file
·92 lines (66 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
/**
* Created by PhpStorm.
* User: qingyun
* Date: 2019-04-18
* Time: 12:51
*/
$ab = 122222; #int integer
echo $ab;
$ab = "aa";# string
echo "ddddd{$ab}"; #双引号识别变量
echo 'ddddd{$ab}'; # 单引号不识别变量
#数组 Array
$ad = array(12,3,4,4,5);
echo $ab;
$ab = [1,2,3,"Dwadwa","fggg"];
print_r($ab);
$ab = ["name"=>"aaa",12=>22]; #管理按数组
print_r($ab);
#对象
#是PHP 自带的
$ad = new stdClass();
print_r($ad);
#资源类型
//$resource = fopen("./aa.txt","w+");
//print_r($resource);
//fwrite($resource,"awddadadadadddaa");
//fclose($resource);
//file_put_contents("aa.txt","dwadawda".PHP_EOL,FILE_APPEND);
$a = file_get_contents("aa.txt");
print_r($a);
//if (1 > 0){
// echo "dwadaw";
//}else{
// echo "dawdawdwa";
//}
//$a = 1;
//while ($a < 100){
// echo $a;
// $a += 1;
//}
//
//
//for ($i = 0;$i< 100;$i++){
// echo $i;
//}
foreach ([1,2,3] as $value){
print_r($value);
echo "/r/n";
}
$arr = [1, 2, 3, 4];
foreach ($arr as $key=>$value) {
echo $value;
}
//$arr = array("one", "two", "three");
//reset($arr);
////while (list($key, $value) = each($arr)) {
//// echo "Key: $key; Value: $value<br />\n";
////}
//
//foreach ($arr as $key => $value) {
// echo "Key: $key; Value: $value<br />\n";
//}
//
//
//