Hi all,
I'm wrestling with this problem for a while now. I want to read a binary
file (created by C software) using PHP. I know of unpack(). But the C struct
that is stored in the binary file contains variables with bitfields:
struct some_struct {
char val_a : 2
int val_b : 7
}
Such a co
ck(). So like this:
$f = fopen('profile', 'r');
$binaryData = fread($f, filesize('profile'));
$data = unpack('a32id/[...etc]', $binaryData);
My problem is: which formats should I use for char vala:3, char valb:1 &
char valc:7 ? In other words: what should
I get browser to cache image.php?id=1 (...
etc.) just as it caches image1.jpg (... etc.)?? The only thing I've thought
of is using mod_rewrite to rewrite URI's like image1.jpg into image.php?id=1
but I haven't tried it yet -- don't know if it's a logical idea.
Thanks in adv
child->parent->property . '';
> >
> >?>
> >[end code]---
> >
> >Now the problem is: IT DOES NOT PRINT TWICE THE SAME!!!
> >Instead it prints 'two' and then 'one', which indica
t return the object it creates!
Someone knows why this ain't working and how to solve it?!? Hope so, can't
wait to hear from you guys.
Thanks in advance,
Tim Molendijk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi all,
I would like to use PHP to read a binary file which contains a structure in
C, such as:
struct simple {
int a;
float b;
};
with f.e. a = 2 and b = 1.5.
Please notice that this is stored as *binary* data and not as text.
I know it is possible to read binary files using fgets() in P
"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message
news:5.1.1.6.2.20021108175627.00b44880@;mail.vogelsinger.at...
>
> This is clearly said in your PHP.ini file:
>
> ; Whether to enable the ability to force arguments to be passed by
reference
> ; at function call time. This method is depr
"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message
news:5.1.1.6.2.20021108170633.00b8cb60@;mail.vogelsinger.at...
>
> You might always simply omit the parameter when calling the function
> (you'll get a notice about that if enabled). You just cannot pass
constants:
>
> function Product(&$
"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message
news:5.1.1.6.2.20021108165218.03238948@;mail.vogelsinger.at...
> One more:
>
> True for now, but this is "officially deprecated". Functions or methods
> accepting a reference are required to be "prototyped" that way - this
helps
> you not
"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message
news:5.1.1.6.2.20021108092657.02befe20@;mail.vogelsinger.at...
> At 03:36 08.11.2002, Tim Molendijk said:
> [snip]
>
> Ahh - culprit 1:
>
> You said the containe
> similar problem on PHP-DEV a while back--if you search the forums you
> > should be able to find it.
> >
> > Hope this helps...
> >
> >
> > Marco
> > -----
> > php|architect -- The Monthly Magazine For PHP Professionals
> > Come visit
First of all I would like to say that I know this is a lot of text but I
would be very pleased if you take a little time to read it nevertheless. The
situation described below is not complicated at all...
=
Hello all,
I'm dealing with this really weird problem
Hi,
I'm using a 3rd pary debug class (ErrorHandler -
http://www.phpclasses.org/browse.html/package/345.html) in this project I'm
working on. For this ErrorHandler class to work it just needs to be
instantiated at the beginning of a php file and it will catch the errors,
warnings and notices.
But
13 matches
Mail list logo