Private Sub ASCII2Bin(ByVal bit() As Byte, ByRef abyte() As Byte)
        Dim i As Integer, j As Integer
        For i = 0 To 7
            For j = 0 To 7
                abyte(i * 8 + j) = (bit(i) \ (2 ^ (7 - j))) And &H1
            Next
        Next
    End Sub

解决方案 »

  1.   

    function ASCII2Bin($bit, $abyte) {
      for ($i=0; $i<=7; $i++) {
        for ($j=0; $j<=7; $j++) {
          abyte[$i * 8 + $j] = (bit[$i] \ (2 ^ (7 - $j))) & 0xH1
        }
      }
    }
      

  2.   

    function ASCII2Bin($bit, &$abyte) {
      for ($i=0; $i<=7; $i++) {
      for ($j=0; $j<=7; $j++) {
      abyte[$i * 8 + $j] = (bit[$i] \ (2 ^ (7 - $j))) & 0xH1
      }
      }
    }
      

  3.   


    但是LIKEWU 还是有报错啊:
    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in I:\PHP\PHPnow-1.5.6\Package\htdocs\cupdt.php on line 295Parse error: syntax error, unexpected T_STRING in I:\PHP\PHPnow-1.5.6\Package\htdocs\cupdt.php on line 295