Re: [PHP] ioctl() in PHP

2002-12-09 Thread Filippo Veneri
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

[PHP] variable scope in nested functions

2002-12-09 Thread Filippo Veneri
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

[PHP] assignment to $this inside constructor

2002-12-04 Thread Filippo Veneri
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 { .

[PHP] Re: object reflection in php?

2002-03-19 Thread Filippo Veneri
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

[PHP] object reflection in php?

2002-03-18 Thread Filippo Veneri
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

[PHP] Re: uploading images

2002-03-09 Thread Filippo Veneri
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

[PHP] upload corrupts images

2002-03-07 Thread Filippo Veneri
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

[PHP] uploading images

2002-03-07 Thread Filippo Veneri
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