sungpeng Posted March 12, 2009 Share Posted March 12, 2009 Can anyone help explain what is whitespace in php. thank Link to comment https://forums.phpfreaks.com/topic/149126-whitespace/ Share on other sites More sharing options...
lonewolf217 Posted March 12, 2009 Share Posted March 12, 2009 this will answer your question http://us.php.net/trim Link to comment https://forums.phpfreaks.com/topic/149126-whitespace/#findComment-783026 Share on other sites More sharing options...
sungpeng Posted March 12, 2009 Author Share Posted March 12, 2009 ok everytime if I need to stored a session and display on next pages got to trim(_session['data']); ? Link to comment https://forums.phpfreaks.com/topic/149126-whitespace/#findComment-783031 Share on other sites More sharing options...
lonewolf217 Posted March 12, 2009 Share Posted March 12, 2009 not exactly .. perhaps it would be better to explain what your problem is before trying to figure out a solution for it Link to comment https://forums.phpfreaks.com/topic/149126-whitespace/#findComment-783035 Share on other sites More sharing options...
sungpeng Posted March 12, 2009 Author Share Posted March 12, 2009 because I always got the error "cannot send session cache limiter" "cannot send session cookie" when doing with session Link to comment https://forums.phpfreaks.com/topic/149126-whitespace/#findComment-783038 Share on other sites More sharing options...
sungpeng Posted March 12, 2009 Author Share Posted March 12, 2009 I change to a new hosting provider and the problem arise.. beforehand when I am with another is ok. Link to comment https://forums.phpfreaks.com/topic/149126-whitespace/#findComment-783043 Share on other sites More sharing options...
sungpeng Posted March 12, 2009 Author Share Posted March 12, 2009 one thing I not sure why php want to make thing hard for us.. why when I sent over _SESSION _POST there is whitespace. Link to comment https://forums.phpfreaks.com/topic/149126-whitespace/#findComment-783046 Share on other sites More sharing options...
PFMaBiSmAd Posted March 12, 2009 Share Posted March 12, 2009 The errors have nothing to do with data. Whitespace in the data is not causing the problem. The errors mean your .php files are outputting content to the browser before a header. There are two possible problems with your .php files - 1) Your files have BOM (Byte Order Mark) characters at the start or 2) Your code was incorrectly designed and your old server had output buffering turned on in php.ini which masked the problem. You would need to post the actual error messages to determine which one of these possible reasons are the cause. Link to comment https://forums.phpfreaks.com/topic/149126-whitespace/#findComment-783059 Share on other sites More sharing options...
sungpeng Posted March 12, 2009 Author Share Posted March 12, 2009 hi PFMaBiSmAd, Could help explain the "outputting content to the browser before a header" and the "Your files have BOM (Byte Order Mark) characters". Trying to understand. I find that I just put the include 'header'; later than the session it solve the problem. Link to comment https://forums.phpfreaks.com/topic/149126-whitespace/#findComment-783069 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.