我正在用PHP开发一个网站,我必须在索引中包含PHP中文本文件的前3行.我怎样才能做到这一点?
<?php $file = file_get_contents("text.txt"); //echo the first 3 lines, but it's wrong echo $file; ?>
php text lines
lines ×1
php ×1
text ×1