惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
SecWiki News
SecWiki News
Forbes - Security
Forbes - Security
N
News | PayPal Newsroom
S
Security @ Cisco Blogs
Schneier on Security
Schneier on Security
V
V2EX - 技术
S
Secure Thoughts
W
WeLiveSecurity
Google DeepMind News
Google DeepMind News
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
S
Securelist
S
Security Archives - TechRepublic
Know Your Adversary
Know Your Adversary
V
Vulnerabilities – Threatpost
Security Latest
Security Latest
Recent Commits to openclaw:main
Recent Commits to openclaw:main
G
GRAHAM CLULEY
H
Hacker News: Front Page
Microsoft Azure Blog
Microsoft Azure Blog
I
Intezer
Google Online Security Blog
Google Online Security Blog
美团技术团队
阮一峰的网络日志
阮一峰的网络日志
T
The Exploit Database - CXSecurity.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Webroot Blog
Webroot Blog
Jina AI
Jina AI
Engineering at Meta
Engineering at Meta
P
Proofpoint News Feed
The Cloudflare Blog
I
InfoQ
L
LangChain Blog
U
Unit 42
P
Proofpoint News Feed
S
Schneier on Security
S
Security Affairs
Y
Y Combinator Blog
T
Tenable Blog
N
News and Events Feed by Topic
MyScale Blog
MyScale Blog
量子位
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
博客园 - 聂微东
D
Darknet – Hacking Tools, Hacker News & Cyber Security
GbyAI
GbyAI
AWS News Blog
AWS News Blog

创业历程 on 张智勇 - 创业、投资

我后来养成的臭毛病 做了一个分享网站:稀奇 开发了个油猴脚本:在雪球首页显示CNN恐惧与贪婪指数 《A4周刊》正式发刊:一周天下事,一张A4知 已转让公司做税务注销的经历 做了一个 AI 导航网站:AnAI.fun Mark下,猛买卖给美团了 当当卓越还是卓越当当? 招聘销售、客服、编辑、PHP程序员、美工、BD、PR
使用PHP调取MySql数据生成Sitemap网站地图
2022-04-22 · via 创业历程 on 张智勇 - 创业、投资

之前一直想自己做Sitemap网站地图但是不会,查了很多攻略都不能用,直到最近终于找到一个可用的(技术问题还是得靠Google啊),翻译并记录如下。

新建一个文件,例如命名为sitemap.php,按照自己的需求修改并输入以下代码,然后保存即可。直接打开https://www.yourdomian.com/sitemap.php即可使用,虽然不是xml格式,但是亲测Google、百度可以支持。

!AAA,改为你的数据库密码

!BBB,改为要使用的数据表。

!CCC,改为读取数据的数据列。

!DDD,改为排序方式,此处是倒序排列,如果需要正序就删除后面的desc。

!EEE,改为需要调用的数据条数。

!FFF,改为URL的前缀,例如前缀是https://www.zyzhang.com/,数据表里的数据是ABC,则Sitemap里面的链接就是「https://www.zyzhang.com/abc」