【发布时间】:2017-06-08 21:10:55
【问题描述】:
我有这个代码:
<?php include("Hedar.php"); ?>
<?php
$q=mysql_query("select * from news2 where id = $news2_id ");
list($news2_ides,$news_id,$name,$text,$stext,$ktext,$dtext,$date,$vews,$path)=mysql_fetch_array($q);
?>
<img src="upload1/<?php echo $path ?>"/>
<h2 class="_title"><?php echo $name ?></h2>
<?php echo $text ?>
<?php include("Footers.php"); ?>
------------
如您所见,我有一个使用 PHP 代码的网站 所以我想在 $text 中插入 2 个 adsense 代码 我试图将这个 $text 分离到许多
但我失败了
所以任何人都可以帮我把它分开(<?php echo $text ?>)
多谢
问候
【问题讨论】:
-
现在使用 mysqli_query 代替 mysql_query。您还可以使用 PDO::query 或 MySQLi::query。你可以在这里查看文档php.net/manual/en/function.mysql-query.php