php-general Digest 26 May 2005 12:27:05 -0000 Issue 3476

Topics (messages 215830 through 215836):

Re: extending a class using includes not working
        215830 by: Richard Lynch
        215832 by: Charles Kline
        215836 by: Jochem Maas

Re: OT but worth a shot: Informix Client Libraries
        215831 by: Richard Lynch

Emisor de respuesta autom�tica: Re: [PHP-DB] Letters loop
        215833 by: MIGUEL ANTONIO GUIRAO AGUILAR

Re: Building multi-page Word docs with PHP?
        215834 by: George Pitcher

Impossible to list attributes of xml-element?
        215835 by: Victor Sp�ng Arthursson

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
On Wed, May 25, 2005 11:30 am, Charles Kline said:
> i have 2 class files. say for example.
>
> class 1
>
> class 2 extends class 1
>
> class 2  uses include_once("firstclass.php")
>
> then i use include_once ("secondclass.php") in my template. this does
> not work. to get it to work, i must put both the files as includes in
> my template.
> any ideas why?

Could you define "does not work" a little more precisely?

Do you get error messages?

What do the error messages say?

Is there any output at all?

Does your computer blow up?

What?

-- 
Like Music?
http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---

On May 25, 2005, at 7:53 PM, Richard Lynch wrote:

On Wed, May 25, 2005 11:30 am, Charles Kline said:

i have 2 class files. say for example.

class 1

class 2 extends class 1

class 2  uses include_once("firstclass.php")

then i use include_once ("secondclass.php") in my template. this does
not work. to get it to work, i must put both the files as includes in
my template.
any ideas why?


Could you define "does not work" a little more precisely?

Do you get error messages?

What do the error messages say?

Is there any output at all?

Does your computer blow up?

What?


Sorry I should have been more specific (or course)...

The template does not load. I get no error messages of any kind. Both classes function fine when included into the template separately - but when in include the secondclass.php which in turn includes firstclass.php the page does not load.

Running on Mac OS X Server version 10.3

- Charles

--- End Message ---
--- Begin Message ---
Charles Kline wrote:

On May 25, 2005, at 7:53 PM, Richard Lynch wrote:

On Wed, May 25, 2005 11:30 am, Charles Kline said:

i have 2 class files. say for example.

class 1

class 2 extends class 1

class 2  uses include_once("firstclass.php")

include, require, etal are not functions exactly...
therefore the brackets are not required, in case you didn't know.
more importantly I would suggest that the include
statement in your class or where ever should be a require(_once)
statement - because without the first class the second class
cannot be used (i.e. firstclass is required!).

require_once 'firstclass.php';


then i use include_once ("secondclass.php") in my template. this does
not work. to get it to work, i must put both the files as includes in
my template.
any ideas why?


Could you define "does not work" a little more precisely?

Do you get error messages?

What do the error messages say?

Is there any output at all?

Does your computer blow up?

What?


Sorry I should have been more specific (or course)...

The template does not load. I get no error messages of any kind. Both classes function fine when included into the template separately - but when in include the secondclass.php which in turn includes firstclass.php the page does not load.

sounds a bit like a problem related to your include_path ....
its possible that the firstclass.php cannot be found in the include path from
within secondclass.php OR maybe a different file is being found
(a file also called firstclass.php but containing so kind of error)

what does the following show you? (if you place it in your code):
<?
        var_dump( ini_get("include_path") );
?>

btw I see such a problem regularly, that is - a require_once statement
fails because the file was not found and the script terminates
with no errors (ANYWHERE!)

ps - what the heck is a 'template' in your world?
pps - do you have error reporting turned up fully? are you logging and/or
outputing errors at all?




Running on Mac OS X Server version 10.3

- Charles


--- End Message ---
--- Begin Message ---
On Wed, May 25, 2005 9:03 am, Mikey said:
> describe as an ancient version of Informix to mySQL. The version
> 4.11.UC3 and I would like to be able to srript the upgrade through PHP, as
>
> So, I was wondering, pretty please, if anyone on the list has had
> getting this database to hook up to PHP or knew of a place to download the
> client
> libraries so that I can have a bash myself?

If all else fails, ODBC may work...

You could also export to CSV or tab-delimited, import 'raw' to MySQL, and
then do the clean-up in MySQL/PHP by moving from one MySQL database to
another.

-- 
Like Music?
http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
Great!! It works pretty good!!!

Thanks!!

--------------------------
MIGUEL GUIRAO AGUILERA
Logistica R8 - Telcel
Tel: (999) 960.7994
Cel: 9931-60000

----- Mensaje original -----
De: Stephen Johnson <[EMAIL PROTECTED]>
Fecha: Mi�rcoles, Mayo 25, 2005 9:57 pm
Asunto: Re: [PHP-DB] Letters loop

> Then this is what I would suggest.
> 
> $alph = array('*', 'A', 'B','C'...etc) ;
> 
> $i=0;
> Echo"<Select name=foo>";
> While($alph[$i]){ 
>  echo"<option value=$alph[$i]>$alph[$i]";
>  $i++; 
> }
> Echo"</Select>";
> 
> On 5/25/05 9:54 PM, "MIGUEL ANTONIO GUIRAO AGUILAR"
> <[EMAIL PROTECTED]> wrote:
> 
> > Yes, because I will create a <select> field within the for loop, 
> and the
> > options of the select should be letters.
> > 
> > --------------------------
> > MIGUEL GUIRAO AGUILERA
> > Logistica R8 - Telcel
> > Tel: (999) 960.7994
> > Cel: 9931-60000
> > 
> > ----- Mensaje original -----
> > De: Stephen Johnson <[EMAIL PROTECTED]>
> > Fecha: Mi�rcoles, Mayo 25, 2005 9:49 pm
> > Asunto: Re: [PHP-DB] Letters loop
> > 
> >> 
> >> Why? 
> >> 
> >> If you need to do a loop that runs 26 times just set your high
> >> value for 26.
> >> 
> >> Is there some reason you need to use letters ?
> >> 
> >> 
> >> 
> >> On 5/25/05 8:37 PM, "MIGUEL ANTONIO GUIRAO AGUILAR"
> >> <[EMAIL PROTECTED]> wrote:
> >> 
> >>> Hi!!
> >>> 
> >>> I wanna a do a for loop with letters, Is this possible?
> >>> 
> >>> for ($i = 'A'; $i <= 'Z'; $i++){
> >>> // code
> >>> }
> >>> 
> >>> --------------------------
> >>> MIGUEL GUIRAO AGUILERA
> >>> Logistica R8 - Telcel
> >>> Tel: (999) 960.7994
> >>> Cel: 9931-60000
> >> 
> >> -- 
> >> Stephen Johnson
> >> The Lone Coder
> >> 
> >> [EMAIL PROTECTED]
> >> http://www.thelonecoder.com
> >> 
> >> *Continuing the struggle against bad code*
> >> --
> >> 
> >> 
> >> 
> > 
> > 
> 
> -- 
> Stephen Johnson
> The Lone Coder
> 
> [EMAIL PROTECTED]
> http://www.thelonecoder.com
> 
> *Continuing the struggle against bad code*
> --
> 
> 
>

--- End Message ---
--- Begin Message ---
Well guys, thanks for the feedback.

Firstly, I am on Windows, and my server runs on NT4. I have no say on that -
company policy.

The files are not zipped in any way as they are being sent to publishers'
rights departments, who struggle with PDFs at times.

I think I'll give COM a try. I do use it to parse an Excel file that we
receive in a predefined format.

Cheers

George

> -----Original Message-----
> From: Rory Browne [mailto:[EMAIL PROTECTED]
> Sent: 26 May 2005 2:47 am
> To: Jochem Maas
> Cc: George Pitcher; [email protected]
> Subject: Re: [PHP] Building multi-page Word docs with PHP?
>
>
> Before we get ahead of ourselves, can we ask what OS you're using George?
>
> If you're using Windows, then you have COM. If you're not insane, then
> you'll have to use unix tools. For turning documents TO word docs,
> then the only way I can think of is to script OOo in some way.
>
> I'm assuming that you're already gzipping your rtf files?
>
> On 5/26/05, Jochem Maas <[EMAIL PROTECTED]> wrote:
> > George Pitcher wrote:
> > > Hi,
> > >
> > > I currently create my multipage docs by saving my word
> templates as chunks
> > > of rtf and then calling them as required as a very long string then
> > > outputting them to an rtf file and renaming it as '*.doc'. It
> works great
> > > except for the filesize which comes out at 900k for a
> two-page document.
> > > Opening in Word and saving reduces the file down
> dramatically, but that
> > > would prevent auto-generation and emailing - without human
> intervention.
> > >
> > > Does anyone know how to either create multipage docs in Word
> format to begin
> > > with, or to convert (on the fly) rtf to doc, or to save rtf
> as smaller file?
> >
> > I googled a bit a stumbled across this:
> >
> > http://www.xmlw.ie/aboutxml/wordml.htm
> >
> > requires word2003 tho.
> >
> > >
> > > MTIA
> > >
> > >
> > > George
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>

--- End Message ---
--- Begin Message ---
Ciao!

I'm selecting an element in the xml using xpath. I know there is only one element matching the xpath-query, but still I get the result as a list. Nevermind.

This list is of the type domnodelist, on which only one action is allowed: item()

Selecting [xpath-result]->item(0) gives me the only element in the result in the form of a domelement. This domelement should have a lot of attributes, but I cant find no way to get some kind of list over those attributes, to work further with.

Could someone please point me in the same direction?

Sincerely

Victor

--- End Message ---

Reply via email to