如何保存动态网页内容,如在谷歌中的谷歌表格 [英] How to save dynamic web page contents like in google forms in php

查看:189
本文介绍了如何保存动态网页内容,如在谷歌中的谷歌表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

创建一个与谷歌表格接近或类似的网站



,用户可以在其中创建新的动态表单并保存。我使用的是PHP,Jquery和JavaScript。在页面中创建表单元素之后,如何将它们保存在数据库或文件中,以便稍后像google表单一样进行检索。即我以后可以访问创建的表格进行数据收集。目前我所尝试的不起作用。请帮助



我尝试过:



ob_start();



//我所有的代码在这里

//结束于:



$ memory = ob_get_contents();

if($ fp = fopen('memory.php','w +')){

fwrite($ fp, $ memory $;
fclose($ fp);

}

ob_end_flush();

?>

Am creating a website close or similar to google forms

where a user can create new dynamic forms and and save it. Am using PHP, Jquery and JavaScript. After creating the form elements in the page how do I save them either in a database or in a file to be retrieved later like google form does. i.e I can access the created forms later for data collection. Currently what I have tried is not working. please help

What I have tried:

ob_start();

//all my code here
// and it ends with:

$memory = ob_get_contents();
if ($fp = fopen('memory.php', 'w+')) {
fwrite ($fp, $memory);
fclose($fp);
}
ob_end_flush();
?>

推荐答案

memory = ob_get_contents();

if(
memory = ob_get_contents();
if (


fp = fopen('memory .php','w +')){

fwrite(
fp = fopen('memory.php', 'w+')) {
fwrite (


fp,


这篇关于如何保存动态网页内容,如在谷歌中的谷歌表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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