الدوال Functions
الفصل الرابع
$qrs = fread ($farw, 70) ;
echo " The 70 byte of file are $qrs "; echo "<BR>
$q = fread($farw, filesize("file1.txt')); echo "<BR> Read up to File size : $q′′;
fclose($farw);
?>
==
http://localhost/test/p044 - Microsoft In EEX
File Edit View
Back
Favorites Tools Help
Stop Refresh Home
Go Links
Address | http://localhost/test/p044
The 40 byte of file are both slash (1) and backslash (1) are
used as path separator character
Read up to File size: in windows. In other environments, use forward slash (/).
Done
Local intranet
ملحوظة :
عند طلب القراءة بكتابة حجم الملف فقد تمت قراءة بقية الملف لأن المؤشر يقف عند
آخر جزء تمت قراءته
·
تستخدم دالة معرفة الوصول لنهاية الملف feoff لمعرفة الوصول إلى نهاية ملف ما
مثال :
Feof ($farw);
وتعيد القيمة true عند الوصول إلى نهاية الملف تستخدم دالة الكتابة إلى ملف Fwrite للكتابة فى ملف ، ولهذه الدالة ثلاثة متغيرات : متغیر (مقبض) الملف ، والنص المطلوب كتابته ، وحجم النص الذي هو أمر
۹۹
ص ٩٩