$myFile = "text.txt";$lines = file($myFile);$link1 = $lines[0];$link2 = $lines[1];<!-- 1 --><iframe src="<?php echo $link1?>" width="100%" height="50" frameborder="0" scrolling="no"> your browser do not support iframes.</iframe><!-- 2 --><iframe src="<?php echo $link2?>" width="100%" height="50" frameborder="0" scrolling="no"> your browser do not support iframes.</iframe>这是它在谷歌浏览器视图源中的显示 方式: https ://i.stack.imgur.com/OOzOV.png 这是它在网站上的显示方式,它没有加载: https://i.stack.imgur .com/ziX0f.png代码有什么问题?
1 回答

慕雪6442864
TA贡献1812条经验 获得超5个赞
将您的行更改为:
$lines = file($myFile, FILE_IGNORE_NEW_LINES);
使用此标志,将删除每行末尾的新行。
- 1 回答
- 0 关注
- 107 浏览
添加回答
举报
0/150
提交
取消