note 95260 added to function.print

From: Date: Tue, 22 Dec 2009 10:28:21 +0000
Subject: note 95260 added to function.print
Groups: php.notes 
Request: Send a blank email to php-notes+get-164203@lists.php.net to get a copy of this message
Printing an empty string from PHP, as in print ""; returns a single byte (content length=1) - the line-feed character '\n' (0a). So if you truly want to return an empty string, you may want to use "flush()" instead - then headers without any Content-length will be returned. Do note, however, that regardless of whether print or flush is used, accessing such a PHP output from AJAX (via .responseText) will always have a '\n' as a value for an "empty" string sent from PHP. ---- Server IP: 195.184.96.15 Probable Submitter: 87.60.144.211 ---- Manual Page -- http://www.php.net/manual/en/function.print.php Edit -- https://master.php.net/note/edit/95260 Del: integrated -- https://master.php.net/note/delete/95260/integrated Del: useless -- https://master.php.net/note/delete/95260/useless Del: bad code -- https://master.php.net/note/delete/95260/bad+code Del: spam -- https://master.php.net/note/delete/95260/spam Del: non-english -- https://master.php.net/note/delete/95260/non-english Del: in docs -- https://master.php.net/note/delete/95260/in+docs Del: other reasons-- https://master.php.net/note/delete/95260 Reject -- https://master.php.net/note/reject/95260 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#164203) next »