I want to upload the BT file to the server and open the BT seed file with PHP, and use PHP to download to the server side, one is to save hard disk space, there is fast!
Who knows? Please post the Code
Reply to discussion (solution)
Large files are not allowed, small files can be.
Time is long, php execution script will time out, you must use server-side command download to download large files
Http://www.162cm.com/archives/287.html
Output read-in array. */Print_r ($DATA); /** @function READBT read into BT file, @param $fp file pointer @param $nowtype: Of course, the metadata type @return array is an array that holds the current set of metadata */Functio N READBT ($fp, $nowtype = "DICT") {$nowindex = ""; while (!feof ($fp)) {$char = (string) fread ($fp, 1); /** actually carefully study, perhaps here a few case placement, such as which in front of which in the post, on the speed is influential, but we do not care about it/switch ($char) { Case ' 1 ': Case ' 2 ': Case ' 3 ': Case ' 4 ': Case ' 5 ': Case ' 6 ': Case ' 7 ': Case ' 8 ': Case ' 9 ': CAs E "0": {$nowindex. = $char; Break } case ":": {$nowtype = "STRING"; $string =fread ($fp, Intval ($nowindex)); $VARS []= $string; $nowindex = ""; $Nowtype= ""; Break } case "I": {$nowtype = "number"; Break The case "E": {/** E is an end-of-code flag, depends on what encoding is currently present. If it is number, a system array that is currently read in is saved directly, and if it is a list or dictionary (dictionary), the array is returned. */switch ($nowtype) {case "number": $VARS []=intval ($nowindex); $nowindex = ""; Break Case "LIST": return $VARS; Break Case "DICT": return $VARS; Break } break; /** When you start a list or dictionary, I use recursion in order to show the table of contents relationships more clearly in the resulting array. You can also not use recursion. */CAsE "L": {$nowtype = "LIST"; $VARS []=READBT ($FP, $nowtype); Break } case "D": {$nowtype = "DICT"; $VARS []=READBT ($FP, $nowtype); Break }}} return $VARS; } fclose ($FP); ?>
+1
Large files are not allowed, small files can be.
Time is long, php execution script will time out, you must use server-side command download to download large files
Http://www.162cm.com/archives/287.html
Output read-in array. */Print_r ($DATA); /** @function READBT read into BT file, @param $fp file pointer @param $nowtype: Of course, the metadata type @return array is an array that holds the current set of metadata */Functio N READBT ($fp, $nowtype = "DICT") {$nowindex = ""; while (!feof ($fp)) {$char = (string) fread ($fp, 1); /** actually carefully study, perhaps here a few case placement, such as which in front of which in the post, on the speed is influential, but we do not care about it/switch ($char) { Case ' 1 ': Case ' 2 ': Case ' 3 ': Case ' 4 ': Case ' 5 ': Case ' 6 ': Case ' 7 ': Case ' 8 ': Case ' 9 ': CAs E "0": {$nowindex. = $char; Break } case ":": {$nowtype = "STRING"; $string =fread ($fp, Intval ($nowindex)); $VARS []= $string; $nowindex = ""; $Nowtype= ""; Break } case "I": {$nowtype = "number"; Break The case "E": {/** E is an end-of-code flag, depends on what encoding is currently present. If it is number, a system array that is currently read in is saved directly, and if it is a list or dictionary (dictionary), the array is returned. */switch ($nowtype) {case "number": $VARS []=intval ($nowindex); $nowindex = ""; Break Case "LIST": return $VARS; Break Case "DICT": return $VARS; Break } break; /** When you start a list or dictionary, I use recursion in order to show the table of contents relationships more clearly in the resulting array. You can also not use recursion. */CAsE "L": {$nowtype = "LIST"; $VARS []=READBT ($FP, $nowtype); Break } case "D": {$nowtype = "DICT"; $VARS []=READBT ($FP, $nowtype); Break }}} return $VARS; } fclose ($FP); ?>