【发布时间】:2011-08-12 21:42:36
【问题描述】:
我需要检索来自包含 mysql 变量的 PHP 文件的 URL。不幸的是,它们没有被正确返回。
下面是我要链接的html文件:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="index" href="toc1.php" type="application/json">
</head>
我的 toc1.php 是文件:
<?php
$username = $_GET['username'];
$papername = $_GET['papername'];
header('Content-Type: application/json');
$username = json_encode($username);
$papername = json_encode($papername);
?>
[{
"url": <?php echo '<a href="http://www.yoozpaper.com/cover.php?
username=' . $username . '&papername=' . $papername . '" ></a>';?>
},
{
"url": <?php echo '<a href="http://www.yoozpaper.com/tocindex.php?
username=' . $username . '&papername=' . $papername . '" ></a>';?>
},]
【问题讨论】: