Skip to content

Commit 2990ed0

Browse files
committed
docs: rename hosts begin str
1 parent dbdfcf5 commit 2990ed0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
## 使用方法
77
### Unix/Linux
88
```shell
9-
sed -i "/# fetch-github-host begin/Q" /etc/hosts && curl https://hosts.gitcdn.top/hosts.txt >> /etc/hosts
9+
sed -i "/# fetch-github-hosts begin/Q" /etc/hosts && curl https://hosts.gitcdn.top/hosts.txt >> /etc/hosts
1010
```
1111
> 提示:可以设置定时任务定时获取更新即可
1212

fetch_hosts.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@
4141
];
4242

4343
$github_hosts = [];
44-
$hosts_content = "# fetch-github-host begin\n";
44+
$hosts_content = "# fetch-github-hosts begin\n";
4545
foreach ($github_urls as $url) {
4646
$item = [gethostbyname($url), $url];
4747
$github_hosts[] = $item;
4848
$hosts_content .= str_pad($item[0], 28) . $item[1] . "\n";
4949
}
5050
$utc_date = date('c');
51-
$hosts_content .= "# last fetch time: $utc_date\n# update url: https://hosts.gitcdn.top/hosts.txt\n# fetch-github-host end\n\n";
51+
$hosts_content .= "# last fetch time: $utc_date\n# update url: https://hosts.gitcdn.top/hosts.txt\n# fetch-github-hosts end\n\n";
5252

5353
$template = file_get_contents('index-template.php');
5454
file_put_contents('index.php', str_replace('<!--time-->', $utc_date, $template));

0 commit comments

Comments
 (0)