![ישן](https://static.fresh.co.il/images/vBulletin/statusicon/post_old.gif)
12-07-2005, 14:56
|
|
|
חבר מתאריך: 23.09.03
הודעות: 12
|
|
אני חושב שיש קשר כי לי הייתה את הבעיה הזאתי כאשר עברתי משרת אחת לשרת אחר
אז ה session לא עבד ניסתי לפתור בהרבה דרכים ורק הפונקציה הזאת עזרה לי .
תיאור הבעיה :
אם אני לא טועה הוא מקבל אזהרה הבאה:
ציטוט:
1)
[error] PHP Warning:
Cannot add header information - headers already sent by
(output started at /path.../file.php: num_of_line)
in /path.../file.php on line: num_of_line
2)
[error] PHP Warning:
session_start(): Cannot send session cache limiter - headers already sent
(output started at /path.../file.php: num_of_line)
in /path.../file.php on line: num_of_line
|
וכדי לפתור את הבעיה צריך לגשת או לשרת ולשנות קובץ ב php.ini
output_buffering= On
שזה :
ציטוט:
Output buffering allows you to send header lines (including cookies) even
after you send body content, at the price of slowing PHP's output layer a
bit. You can enable output buffering during runtime by calling the output
buffering functions. You can also enable output buffering for all files by
setting this directive to On. If you wish to limit the size of the buffer
to a certain size - you can use a maximum number of bytes instead of 'On', as
a value for this directive (e.g., output_buffering=4096).
|
או בדרך שנייה כאשר אין לך גישה לקובץ זה . וזה ע"י פונקציה שנתתי
ציטוט:
ob_start() Enable output buffering. Output buffering supports multiple levels -- i.e., you can call ob_start() several times.
|
|