-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathfile.php
executable file
·85 lines (73 loc) · 1.87 KB
/
file.php
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>PHP</title>
</head>
<body>
<?php
function readFileByLine($filename)
{
$file = fopen($filename, "r");
$lineArray = array();
$i = 0;
//输出文本中所有的行,直到文件結束為止。
while(! feof($file))
{
$lineArray[$i] = fgets($file);//fgets()函數從文件指針中讀取一行
$i++;
}
fclose($file);
$lineArray = array_filter($lineArray);
return $lineArray;
}
function dump($vars, $label = '', $return = false) {
if (ini_get('html_errors')) {
$content = "<pre>\n";
if ($label != '') {
$content .= "<strong>{$label} :</strong>\n";
}
$content .= htmlspecialchars(print_r($vars, true));
$content .= "\n</pre>\n";
} else {
$content = $label . " :\n" . print_r($vars, true);
}
if ($return) { return $content; }
echo $content;
return null;
}
$filename = "2017-06-27.txt";
$fileArray = readFileByLine($filename);
dump($fileArray);
// $strArr = explode("|", $fileArray[0]);
// dump($strArr);
?>
</body>
</html>
<!-- db.createUser({
user: "test",
pwd: "123456",
roles: [{
role: "readWrite",
db: "test",
}]
})
mongo -u root -p 123456 --authenticationDatabase admin
mongo -u test -p 123456 --authenticationDatabase test -->
<VirtualHost *:80>
ServerName h5.lunengsports.net
ServerAdmin [email protected]
DocumentRoot /approot/www/lnts.vue/dist/
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory "/approot/www/lnts.vue/dist/">
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/h5.lunengsports.error.log
CustomLog ${APACHE_LOG_DIR}/h5.lunengsports.access.log combined
</VirtualHost>