$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 這是它在網(wǎng)站上的顯示方式,它沒有加載: https://i.stack.imgur .com/ziX0f.png代碼有什么問題?
1 回答

慕雪6442864
TA貢獻(xiàn)1812條經(jīng)驗 獲得超5個贊
將您的行更改為:
$lines = file($myFile, FILE_IGNORE_NEW_LINES);
使用此標(biāo)志,將刪除每行末尾的新行。
- 1 回答
- 0 關(guān)注
- 120 瀏覽
添加回答
舉報
0/150
提交
取消