View Single Post
ישן 27-08-06, 14:09   # 10
Eli-Hai
משתמש - היכל התהילה
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 2,758

Eli-Hai לא מחובר  

ציטוט:
אם אתה רוצה את התוכן של העמוד בתוך משתנה אתה צריך להשתמש ב-fopen + fread, או יותר פשוט - file_get_contents()
גם הפונקציה file() יכולה לעבוד בצורה מעולה על קריאת התוכן של הקובץ, היא מצריכה לולאת While להדפסת תוכן הקובץ, יש ב PHP.net קוד מפורט.

ציטוט:
לא נכון בכלל
REQUIRE ו INCLUDE עושים את אותה פעולה

רק ש REQUIRE מציג ארור אם הקובץ לא קיים
החלטתי לבדוק בשבילך, ולהוכיח ש Include מחזיר שגיאה, בדיוק כמו Require.
ניסיתי לקרוא את test.php, וקיבלתי את הError הבא (מ-Include) -
ציטוט:
Warning: main() [function.main]: Unable to access ./test.php in /home/elihai/domains/*/public_html/test-include.php on line 3

Warning: main(./test.php) [function.main]: failed to open stream: No such file or directory in /home/elihai/domains/*/public_html/test-include.php on line 3

Warning: main() [function.include]: Failed opening './test.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/elihai/domains/*/public_html/test-include.php on line 3
טעות שלי עם הייבוא משתנים.
  Reply With Quote