自我保存来源(PHP) [英] Saving Source of Self (PHP)

查看:136
本文介绍了自我保存来源(PHP)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,所以我有这个奇怪的问题。而啊,没有解决方案。有人可以请帮我或送我正确的方向吗?

我有一个简单的HTML页面,我需要能够有一个保存按钮上用户将点击的页面。点击那个保存按钮后,PHP会把当前页面的一个副本保存到我的服务器上的同一目录中。

这甚至可能吗?x



谢谢!
任何帮助都值得赞赏

解决方案

您可能需要使用Ajax做些事情。如果你使用的是jQuery,你可以使用 $('body')。html()来获取页面的整个HTML,然后用Ajax POST发送。 >

Okay, so I have this strange problem. And ah, no solution. Can somebody please help me or send me off in the right direction?

I have a simple HTML page, and I need to be able to have a 'Save' button on the page that the user will click. And upon clicking that save button, PHP will then save a copy of the current page the user is on to the same directory on my server.

Is this even possible?x

Thanks! Any help at all is much appreciated

解决方案

You probably need to do something with Ajax. If you're using jQuery you could get the entire HTML of the page using $('body').html() and send that with an Ajax POST.

这篇关于自我保存来源(PHP)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆