Php 表和JSON数据的问题
我从显示网站模板的API获取数据。 然后,用户可以继续使用这些模板创建网站 我的头的一部分使用两个表,使用两个不同的文件;microheader.html和header.html 我将这些调用到我的php文件中,如下所示Php 表和JSON数据的问题,php,html,json,api,Php,Html,Json,Api,我从显示网站模板的API获取数据。 然后,用户可以继续使用这些模板创建网站 我的头的一部分使用两个表,使用两个不同的文件;microheader.html和header.html 我将这些调用到我的php文件中,如下所示 <html> <head> <title>Website Builder</title> <link rel="stylesheet" type="text/css" href="css.css"> </he
<html>
<head>
<title>Website Builder</title>
<link rel="stylesheet" type="text/css" href="css.css">
</head>
<body>
<?php
$header = fopen("header.html", "r") or die("Unable to open file!");
echo fread($header,filesize("header.html"));
fclose($header);
$microheader = fopen("microheader.html", "r") or die("Unable to open file!");
echo fread($microheader,filesize("microheader.html"));
fclose($microheader);
$contents = file_get_contents('content.html');
echo $contents;
require('templates.php');
?>
</body>
</html>
网站建设者
有没有一种方法可以让我把一张桌子一张接一张地摆出来
这些桌子没有问题。标题由表格组成。
当我单独显示每个表时,即显示一个表并测试、移除、显示另一个表、测试,一切正常。但使用表,然后直接使用表,会导致将数据发送到我正在使用的网站构建器API时出现问题。我的表格可以在下面找到
第一个表格是:
<table class="micronav">
<tr>
<td>
<p class="micronavp">Low Cost Business Websites, PPC & SEO</p>
</td>
</tr>
</table>
低成本商业网站、PPC和;搜索引擎优化
第二张桌子是
<table class="topnav">
<tr>
<td>
<img alt ="" class="headerimg" src="https://www..co.uk/wp-content/uploads/2016/10/-2.png">
</td>
<td>
<ul>
<li><a href="https://www..co.uk/contact-us/">CONTACT</a></li>
<li><a href="https://www..co.uk/my-account/">MY ACCOUNT</a></li>
<li><a href="https://www..co.uk/portfolio-item/">BLOG</a></li>
<li><a href="https://www..co.uk/digital-marketing-business-opportunities/">BUSINESS OPPORTUNITIES</a></li>
<li class="dropdown">
<a href="#" class="dropbtn">LEAD GENERATION</a>
<div class="dropdown-content">
<a href="https://www..co.uk/product-category/small-business-seo/">Small Business SEO</a>
<a href="https://www..co.uk/product-category/pay-per-click-small-businesses/">Pay Per Click</a>
<a href="https://www..co.uk/product-category/email-marketing/">Email Marketing</a>
<a href="https://www..co.uk/product-category/b2b-mailing-lists/">B2B Mailing Lists</a>
<a href="https://www..co.uk/product-category/sms-marketing/">SMS Marketing</a>
</div>
</li>
<li class="dropdown">
<a href="#" class="dropbtn">SMALL BUSINESS WEBSITES</a>
<div class="dropdown-content">
<a href="#">Do It Yourself</a>
<a href="https://www..co.uk/small-business-websites/">Website Design Services</a>
</div>
</li>
<li><a href="https://.co.uk/">HOME</a></li>
<li></li>
</ul>
</td>
</tr>
</table>
-
-
php文件获取JSON数据并显示它,这很好
我的表有什么地方做错了吗?有没有办法发布一条包含JSON api数据的私人消息
提前谢谢
当我取出其中一个表时,它会工作,并将用户带到一个外部网站生成器,其中包含Url get参数,但当我在File Open php中直接在两个单独的html文件中使用两个表时,它不会工作,会将用户带到
非常感谢您的帮助