From f207d09a64e8eaa067e1be467f24a7d6c0e5c94e Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 8 Jun 2003 11:40:29 +0000 Subject: [PATCH] More explicit byte-order of strings to make it work on non-Intel machines --- lib/psxlsgen.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/psxlsgen.php b/lib/psxlsgen.php index 12b4a0d251..c7b9c06ba4 100644 --- a/lib/psxlsgen.php +++ b/lib/psxlsgen.php @@ -54,7 +54,7 @@ if( !defined( "PHP_SIMPLE_XLS_GEN" ) ) { $this->dirsep = "/"; } // begin of the excel file header - $this->xls_data = pack( "ssssss", 0x809, 0x08, 0x00,0x10, 0x0, 0x0 ); + $this->xls_data = pack( "vvvvvv", 0x809, 0x08, 0x00,0x10, 0x0, 0x0 ); // check header text if ( $this->header ) { $this->Header(); @@ -76,7 +76,7 @@ if( !defined( "PHP_SIMPLE_XLS_GEN" ) ) { // end of the excel file function End() { - $this->xls_data .= pack("sssssssC", 0x7D, 11, 3, 4, 25600,0,0,0); + $this->xls_data .= pack("vvvvvvvC", 0x7D, 11, 3, 4, 25600,0,0,0); $this->xls_data .= pack( "ss", 0x0A, 0x00 ); return; } @@ -84,7 +84,7 @@ if( !defined( "PHP_SIMPLE_XLS_GEN" ) ) { // write a Number (double) into row, col function WriteNumber_pos( $row, $col, $value ) { - $this->xls_data .= pack( "sssss", 0x0203, 14, $row, $col, 0x00 ); + $this->xls_data .= pack( "vvvvv", 0x0203, 14, $row, $col, 0x00 ); $this->xls_data .= pack( "d", $value ); return; } -- 2.39.5