On Mon, 2002-12-09 at 13:41, Lokesh Setia wrote:
>
>
> Hello PHP'ers!
>
> We wish to control a hardware device (a GPIB card) using a web
> interface. This device is normally controlled using either:
>
> 1. simple ioctl() calls to the linux kernel
> 2. by a higher level C-library which inturn c
Is there a way to access a variable defined in a function from a nested
function, without putting the variable in the global scope?
Perhaps some code will make my question clearer:
function enclosing() {
$variable1;
function enclosed() {
can I access $variable1 from
Let's begin with a small code snippet:
class A {
function A( $selector ) {
switch( $selector ) {
case 1: $obj = new A_1(); break;
case 2: $obj = new A_2(); break;
...
}
$this = $obj;
}
}
class A_1 {
...
}
class A_2 {
.
Thanks to all who posted!
What i was looking for is
object_get_vars(), which,
for some reason, is not
present in my (offline) copy
of the manual.
Thanks again,
fbv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Is there a way to get the name of a filed
from a variable pointing to some object?
Just to make myself understood:
class obj {
var $field;
function obj( $value ) {
$this->field = $value;
}
}
$o = new obj( "field value" );
How can i know, if possible, that the instance of
obj poi
George Whiffen wrote:
> Wierd, sounds like it could be a bug. What's the actual code you use
> for the upload?
>
> I presume you are running vim from the command line of the box to which
> the image is
> uploaded. Content-Type: image/jpeg is, of course, what Apache would add
> if you requested
When i upload an image file (i.e. a jpeg) to the server
using php, it gets corrupted. Indeed the GIMP is no
longer able to open it.
Opening the uploaded file with a text editor i found that
the following 2 lines were added at the top (as displayed by
vim, my text editor):
Content-Type: image/jpeg
When uploading image files to my powerpc linux box (derived
from redhat 7.1) running apache + php4.0.4pl1 something
wierd happen.
Images get corrupted by (IMHO) php itself. It adds the
following 2 lines at the top of the file:
Content-Type: image/jpeg^M
^M
...(rergular image file data)
(as displ
8 matches
Mail list logo