2013-07-13 52 views

回答

0

使用此:

$content = ''; 
// iterate over each line of the ini file 
foreach(file('your.ini') as $line) { 
    // if the line doesn't start with YOURKEY ... 
    if(!preg_match('~^YOURKEY~', $str)) { 
     // add it to output 
     $content .= $line; 
    } 
} 
file_put_contents('your.ini', $content); 
相關問題