一段写法报错
news表里面有两笔数据,没问题。然后用最简单的PHP语句将其显示出来,却报错了:
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/..数据库连接代码,省略<table><?php$result = mysql_query("SELECT news_title,in_time FROM news");//这里确认是有值的 while ($row=mysql_fetch_row($result)) {?> <tr> <td> <img src="../images/icon.gif" style="max-width:90%" style="max-width:90%" / alt="一段写法报错,该如何解决" ><script src="https://www.php.cn/hezuo/f220a8ffcae8732bbc8e3d8f7f36834b.js"></script> <a href="../news/?news_title=$row('news_title')" target="_blank"> //这里的news_title取不到值 <?php echo "$row('news_title')"; ?>//这里报错,报错内容:Fatal error: Function name must be a string in </a> <span class="gray"> <?php echo "$row('in_time')"; ?></span> </td> </tr><?php }mysql_free_result($result);?> <table>
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号