Reading with C 'struct' data
| From: | CW Huang | Date: | Sat, 04 Aug 2001 04:55:49 +0000 |
| Subject: | Reading with C 'struct' data | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-61220@lists.php.net to get a copy of this message | ||
I have a file written by C whit a c-style struct like this:
struct BACACHE
{
char author[300][100];
int top;
time_t uptime;
time_t touchtime;
int busystate;
};
is there any way to get these data into PHP with certain variable type ?
I've tried to use " unpack() " function, but I found that unpack() can't
unpack a char array ( I mean string) , it breaks string into characters....
please help me...