[英]How can i connect a html page to a Microsoft SQL Server?
I am currently working on a html web page that is supposed to visualize the data (with tables, charts, graphs...) saved in a SQL database which lies on a local Microsoft SQL Server 2014 . I am currently working on a html web page that is supposed to visualize the data (with tables, charts, graphs...) saved in a SQL database which lies on a local Microsoft SQL Server 2014 .
Is there a common practise to connect the web page to this server ?是否有将 web 页面连接到此服务器的常见做法? I stumbled upon node.js and ajax, but i could not manage to find a proper way to get the data out of the database.我偶然发现了 node.js 和 ajax,但我找不到合适的方法将数据从数据库中取出。
I'm completely new to this topic since i never had to back up a webpage dynamically by connecting to a database so please take me there in baby steps:)我对这个主题完全陌生,因为我从来不需要通过连接到数据库来动态备份网页,所以请带我去那里:)
So far, i'm using nothing else but jQuery.到目前为止,我只使用了 jQuery。
Thank you in advance先感谢您
The most basic way is to install XAMPP on your server.最基本的方法是在您的服务器上安装XAMPP 。 On it's official site there are manuals to installing and configuring it.在它的官方网站上有安装和配置它的手册。
To connect PHP to SQL Server your will need to install proper drivers (check PHP version, x64/x86 etc on ' details ' part of page).要将 PHP 连接到 SQL 服务器,您需要安装正确的 驱动程序(检查 PHP 版本、x64/x86 等页面的“详细信息”部分)
Basic info how to connect to SQL Server you can find on web or, for example, here to connect via PDO, and here to connect via SQLSRV.关于如何连接到 SQL 服务器的基本信息,您可以在 web 上找到,或者,例如,这里通过 PDO 连接,这里通过 SQLSRV 连接。
After on installations and configuring is done - you need to create PHP page that will take data from SQL Server and show it to user in proper way.安装和配置完成后 - 您需要创建 PHP 页面,该页面将从 SQL 服务器获取数据并以正确的方式显示给用户。
EDIT编辑
I forgot about SSRS (SQL Server Reporting Services) Here is an old good guide how to use it.我忘记了SSRS (SQL Server Reporting Services)这是一个古老的好指南如何使用它。
"Hi, you can do this by creating a DSN using ODBC Data Source: “您好,您可以使用 ODBC 数据源创建 DSN:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.