|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-17 18:17 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 16:00:01 2025 UTC |
Description: ------------ When sending POST data by xmlhttp-ajax method from jscript client to 2.2.3 apache server (PHP receipt container), the spaces in the data are not converted to "+" signs as they are supposed to be with MIME type application/x-www-form-urlencode. It worked before with older PHP and Apache. Apache.org sent me over here. I can get around this by doing a php str_replace(" ","+") to the data. Reproduce code: --------------- for the record: client (partial)- ====== var ops = "data_container.php?file="+ filenm + "&user=" + user + "&sid="+Math.random() xmlhttp=new ActiveXObject('Microsoft.XMLHTTP'); xmlhttp.onreadystatechange=loadSizes; xmlhttp.open('POST', ops, false); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") xmlhttp.send("xx__val=" + Base64data); Server- <?php $file = $_GET['file']; $user = $_GET['user']; echo "<form name='form1' method='post' action='' enctype='multipart/form-data' target='_blank'>"; $pre_contents = $_POST['xx__val'];