我正在使用Ionic Framework创建一个移动应用程序.我得到了所有在线创建的html页面.现在我想要一些后端代码从sql server获取数据.接收数据与php没有问题.但是当我使用php页面时,我没有使用Ionic创建的界面.
我如何使用php页面(而不是html)仍然可以从离子中获取布局?示例:my scorebord.php
<?php
$servername = "localhost:3306";
$username = "ssss";
$password = "dffd";
$dbname = "ddddd";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT user_username,user_city,user_highscore FROM tbl_user";
$result = $conn->query($sql);
?>
<ion-view style="" title="Scorebord">
<ion-content class="has-header" overflow-scroll="true" padding="true" style="background: url(img/hX1ml1TVGgABo3ENE6Qg_menu3.png) no-repeat center;">
<h1 style="">Scorebord</h1>
<table style="width:100%">
<?php
if ($result->num_rows > 0) {
// output data of each row
while ($row = …Run Code Online (Sandbox Code Playgroud)