Ara 1 2009
Php ile Dosya Okuma (txt text)
Php ile dosya Okuma (txt text) Aşağıdaki örneğimizde root dosyadaki dosya.txt içinin okunması ile ilgili örnek mevcuttur. Fopen fonksiyonu ile dosya açılarak printe fonksiyonu ile satır satır yazdırıyoruz.
<?
/*
$dosya_adi=”dosya.txt”;
if ($dosya=fopen(“$dosya_adi”,’r’))
{
$i=0;
while ($i <= 5) {
$i++;
$satir=fgets($dosya,1024);
print “”.$satir.”<br>”;
}
}
else
print “Dosya açılamadı: “.$dosya_adi;
*/
$dosya = file(“dosya.txt”);
foreach ($dosya as $satsayisi => $satir)
{
}
$hedefsatir = $satsayisi – 5;
//print $hedefsatir ;
foreach ($dosya as $satsayisi => $satir)
{
if ($hedefsatir==$satsayisi){
print $satir;
}
}
/*
$str = “Hello#world!”;
$bol = spliti(‘#’,$str);
print $bol[1];
*/
?>
prezent dla dziewczyny
17 Kasım 2011 @ 00:04
I’m extremely impressed with your writing skills as well as with the layout on your blog. Is this a paid theme or did you customize it yourself? Either way keep up the excellent quality writing, it is rare to see a great blog like this one today..
Burhan KARADERE
17 Kasım 2011 @ 09:49
Thank you,
I am used customize modify template.
it is current theme name Atahualpa . Can you visit http://forum.bytesforall.com/
Best Regards.