asp代码:
with.respose
    Write "length:"
    Write request.TotalBytes
    Dim a
    a = request.BinaryRead( request.TotalBytes )
    if request.TotalBytes > 0
        then
        Write "data" & CSTR( a )
    end if因为项目需要,需要将上面的代码转为相同功能的php代码,我的做法是:$inputsocket = fopen( 'php://input', 'rb' );
$contents = stream_get_contents( $inputsocket );
fclose( $inputscoket );
print( "data:".$contents );但是发现当我从程序中或者从web的表单中post数据时,先是不出任何内容,我需要的功能是将post的任何数据全部显示出来,以供以后的分析,哪位有好的点子,帮帮忙。
谢谢大家啦!