ID:               44406
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dennis at studiomagenta dot co dot th
-Status:           Open
+Status:           Feedback
 Bug Type:         Scripting Engine problem
 Operating System: Linux Apache 1.3.41
 PHP Version:      5.2.5
 New Comment:

Try removing the trailing ?> (it's optional anyway..)


Previous Comments:
------------------------------------------------------------------------

[2008-03-11 11:35:44] dennis at studiomagenta dot co dot th

Description:
------------
After including a 'require' statement in my PHP script I found that an
echoed output of variables in the same script inserted an unwanted and
unexpected space character (%20) before the first variable name. I found
the same problem when using 'include' instead of 'require'. The included
PHP script is located in the root of the web server, not in the public
area.

This space character effectively corrupted the name of the variable
which caused it not to be recognised by my receiving Flash program.

Output before including the 'require' statement:
reply=valid user&company_name=ABC

Output after including the 'require' statement:
%20reply=valid user&company_name=ABC

Reproduce code:
---------------
<?php
require '../../userpass.php';
echo "reply=valid user&company_name=ABC";
?>


And the sample code for the required file userpass.php:

<?php 
$mySQLdatabase = 'some_database';
$mySQLusername = 'some_login'; 
$mySQLpassword = 'some_password'; 
?>

Expected result:
----------------
reply=valid user&company_name=ABC

Actual result:
--------------
%20reply=valid user&company_name=ABC


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44406&edit=1

Reply via email to