允许用户将代码复制并粘贴到自己的网站中

编程入门 行业动态 更新时间:2024-10-25 03:19:07
本文介绍了允许用户将代码复制并粘贴到自己的网站中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经用PHP和MySQL开发了一个Web应用程序.我已经搁置了一段时间的系统的一部分是,允许我的用户在我的应用程序内创建一个简单的表单,完成后,将我生成的一些代码复制并粘贴到现有的代码中远程网站(IE:联系表格)应出现在该网站上. 当网站访问者将其数据输入该联系表"或他们创建的任何内容时,它应将信息保存到我的应用程序数据库中,以便用户可以访问它.它必须不引人注目.

I''ve developed a web application in PHP and MySQL. One part of the system I''ve been putting on hold for a while now, is allowing my users to create a simple form inside my application, and once they''re done, copy and paste some code which I generate into their existing remote websites (IE: Contact Form) where this form should appear. When visitors to their site enter their data into that "contact form" or whatever they''ve created, it should save the info into my application database where the users will be able to access it. It must be unobtrusive. Is there anyone who can give me a good starting point on how to achieve this?

推荐答案

您不能只是将表单元素复制并粘贴到某人中"的Web应用程序.有许多因素需要考虑.例如,您如何发布到服务器?如果页面上还有其他表格怎么办?如果所使用的框架不支持多种形式,如ASP.NET,该怎么办?跨站点脚本怎么办?另一个主机是否允许此类通信? 一般来说,我会认为这是一个糟糕的设计. You can''t just copy and paste a form element into someone''s web application. There are a number of factors to take into consideration. For instance, how are you posting to your server? What if there are other forms on the page? What if the framework being used doesn''t support multiple forms, such as ASP.NET. What about cross-site scripting? Does the other host allow such communications? In general I would consider it a bad design.

更多推荐

允许用户将代码复制并粘贴到自己的网站中

本文发布于:2023-10-30 04:02:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1541701.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自己的   代码   用户   网站

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!