简体   繁体   English

PHP文件路径搞乱html链接

[英]PHP filepath messing html links

I have an issue migrating a site where the links are all broken. 我在迁移链接全部损坏的网站时遇到问题。 It's a html site but uses php file system. 这是一个HTML网站,但使用PHP文件系统。 The links in the index.html has \\ in front of it. index.html中的链接在其前面有\\。 There's a file of php files like: Configuration.php, FileSystem.php, Bootstrap.php, Handler.php. 有一个php文件的文件,如:Configuration.php,FileSystem.php,Bootstrap.php,Handler.php。 How do I revert to just regular hmtl links. 如何恢复到常规的hmtl链接。

Thanks! 谢谢!

If all you want to do is convert the dynamic PHP based website to a static HTML is easy. 如果您想要做的就是将基于动态PHP的网站转换为静态HTML很容易。

Open the website in Firefox (Chrome will probably work too, but I did not test). 在Firefox中打开网站(Chrome也可能会工作,但我没有测试)。 Go to File->Save Page As... and select a directory on your PC. 转到File->Save Page As...并选择PC上的目录。

Firefox will then download the main file and needed dependencies to the PC eliminating all the PHP since it doesn't even know the server generated the page dynamically using PHP. Firefox将下载主文件并需要依赖于PC,从而消除所有PHP,因为它甚至不知道服务器使用PHP动态生成页面。

You can now deploy the site where ever you like. 您现在可以随意部署站点。

Please note that if there are JS files that actively communicate with the server to download content dynamically you'll have to edit them yourself. 请注意,如果有JS文件主动与服务器通信以动态下载内容,则必须自己编辑它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM