]> git.mjollnir.org Git - moodle.git/commitdiff
More explicit byte-order of strings to make it work on non-Intel machines
authormoodler <moodler>
Sun, 8 Jun 2003 11:40:29 +0000 (11:40 +0000)
committermoodler <moodler>
Sun, 8 Jun 2003 11:40:29 +0000 (11:40 +0000)
lib/psxlsgen.php

index 12b4a0d251fb6c0b0c56e0101a5be170cf97436f..c7b9c06ba46f000bbcddcf1b910452a94dd9aeb4 100644 (file)
@@ -54,7 +54,7 @@ if( !defined( "PHP_SIMPLE_XLS_GEN" ) ) {
          $this->dirsep =  "/";\r
        }\r
        // begin of the excel file header\r
-       $this->xls_data = pack( "ssssss", 0x809, 0x08, 0x00,0x10, 0x0, 0x0 );\r
+       $this->xls_data = pack( "vvvvvv", 0x809, 0x08, 0x00,0x10, 0x0, 0x0 );\r
        // check header text\r
        if ( $this->header ) {\r
          $this->Header();\r
@@ -76,7 +76,7 @@ if( !defined( "PHP_SIMPLE_XLS_GEN" ) ) {
      // end of the excel file\r
      function End()\r
      {\r
-       $this->xls_data .= pack("sssssssC", 0x7D, 11, 3, 4, 25600,0,0,0);\r
+       $this->xls_data .= pack("vvvvvvvC", 0x7D, 11, 3, 4, 25600,0,0,0);\r
        $this->xls_data .= pack( "ss", 0x0A, 0x00 );\r
        return;\r
      }\r
@@ -84,7 +84,7 @@ if( !defined( "PHP_SIMPLE_XLS_GEN" ) ) {
      // write a Number (double) into row, col\r
      function WriteNumber_pos( $row, $col, $value )\r
      {\r
-       $this->xls_data .= pack( "sssss", 0x0203, 14, $row, $col, 0x00 );\r
+       $this->xls_data .= pack( "vvvvv", 0x0203, 14, $row, $col, 0x00 );\r
        $this->xls_data .= pack( "d", $value );\r
        return;\r
      }\r