2013-07-17 84 views

回答

0

所有你所要做的就是打开一个文件,并写入内容:

$fd = fopen("FILENAME","w"); 
fwrite($fd, $id); 
fclose($fd); 

看看PHP手册:PHP Filesystem funcions

0
$filename = 'test.txt'; 
if ($handle = fopen($filename, "w")) { 
    fwrite($handle, $id); 
} 
fclose($handle); 
0

您可以用这种方式

$myFile = "testFile.txt"; 
$fh = fopen($myFile, 'w') or die("can't open file"); 
$stringData = $id; 
fwrite($fh, $stringData); 
fclose($fh); 
0

好的,你必须打开一个文件:

$datei_handle=fopen("part_of_url.txt",w); 

确保您使用正确的模式! 写下你的东西,如果。

fwrite($datei_handle,$your_url_part); 

关闭文件。

fclose($datei_handle); 

另外检查曼努埃尔。我认为那里有很好的解释。 http://php.net/manual/de/function.fwrite.php

希望有所帮助。

相关问题