使用php为本地html文件生成url

时间:2024-04-17 21:50:17

1. 查看你是不是有php

   which php

2.  假设你的Demo.html 路径为 /Users/Sheron/Downloads/Demo.html 

   

cd /Users/Sheron/Downloads/
php -S localhost:8080

3.  在浏览器打开 https://localhost:8080/Demo.html 就可以了