显示下拉菜单

fgetss()

« fgets | file_exists »
<?php
// loads some data in a temp file
file_put_contents(
    
"/tmp/pbe.txt",
    
 // mixed $data
);

$count =
    
// int $count

$handle fopen("/tmp/pbe.txt""r");

for (
$i 0$i $count$i++) {
    
fgetss($handle);
}

$string fgetss (
    
// resource $handle
    
// [int $length]
    
  // [string $allowable_tags]
);
?>
结果
$string = '   Welcome!
'
示例
#1 fgetss  (/* $data = "<html><body> <p>Welcome!</p> </body></html> Text outside of the HTML block." */
 /* $count = 1 */
 /* $handle = $handle */
)
#2 fgetss  (/* $data = "<html><body> <p>Welcome!</p> </body></html> Text outside of the HTML block." */
 /* $count = 1 */
 /* $handle = $handle */
 /* $length = 100 */
 /* $allowable_tags = "<p>" */
)
另请参阅
fgetc, fgets, strip_tags