<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_61469"> <div class="blockcode"> <div id="code_Llf"><ol> <li> <?php <li> $handle = @ fopen ( "demo.txt" , "r" ); <li> if ( $handle ) { <li> while (( $buffer = fgets ( $handle , 4096 )) !== false ) { <li> echo $buffer ; <li> } <li> if (! feof ( $handle )) { <li> echo "Error: unexpected fgets() failn" ; <li> } <li> fclose ( $handle ); <li> } <li> <li> echo '<hr/>'; </li> <li> </li> <li> $length= readfile("demo.txt"); </li> <li> </li> <li> echo '<hr/>'; </li> <li> </li> <li> $file_str = 'demo.txt'; </li> <li> </li> <li> if(file_exists($file_str)) </li> <li> { </li> <li> echo file_get_contents($file_str); </li> <li> </li> <li> } </li> <li> </li> <li> ?> </li> </ol></div> <em onclick="copycode($('code_Llf'));">复制代码</em> </div> <br> </td></tr></table> <div class="ptg mbm mtn"> PHP</div> <div id="comment_61469" class="cm"> </div> <div id="post_rate_div_61469"></div> <br><br>