php-windows Digest 20 Mar 2003 22:53:28 -0000 Issue 1644

Topics (messages 19069 through 19072):

newbie popen problem
        19069 by: Vince Murphy

Re: Calculationg lines of text
        19070 by: Svensson, B.A.T. (HKG)

Re: Subject: Calculationg lines of text
        19071 by: Neil Smith

Re: Excel Spreadsheet as a datasource (Using Excel thru COM)
        19072 by: Scott Hurring

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 ---
I'm new at this. I'm trying to execute the popen function in order to run
a database query on a progress database from php. I'm using
winxp/iis/php4.3.1. When I execute the function I get:

Warning: popen(\progra~1\progress\bin\_progres.exe -pf
\Inetpub\wwwroot\bimeda\prophp\prophp.pf -p
\Inetpub\wwwroot\bimeda\prophp\example1.p,r) [function.popen]: No error in
c:\php\includes\prophp.inc on line 80

Is there some trick to this?
Are pipes supported on a win32 platform correctly?
Any idea's appreciated.



--- End Message ---
--- Begin Message ---
Studdy this:

http://www.php.net/manual/en/function.fgets.php

and this:

http://www.php.net/manual/en/function.strlen.php

> -----Original Message-----
> From: Bobo Wieland [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 19, 2003 10:29 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Calculationg lines of text
> 
> 
> When you're dealing with layout w text and images in documents on the web,
> where the text/images is updatable by the client, it would be nice to be
> able to calulate lines of text and charachters per line. Is there some way
> to do this in php? If not, is it possible in some other language?
> Javascript, maybe?
> 
> 
> .bobo
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message --- Not really Bobo, since anybody can open their browser window in various sizes, number of pixels per inch of screen varies, fonts have differing character widths and so on. Javascript isnt much help here.

You can possibly have some default hidden text in a div and measure the clientWidth or offsetWidth CSS property of it using javascript, but its no practical use in predicting the width of the text you *want* to show.

The only way I can think of is to use fixed width fonts (ugh!) like system fonts defaultly used inside <PRE> or <TEXTAREA> tags. Of course, users can specify their own stylesheet overriding anything you might choose to use. Unlucky !

So, IMO I would have to say no. Bet plan is to make a good guess and keep your fingers crossed.

Any particular reason you might want to do this ? The trend with the web in any case is to go for fluid layout for different browser types, platforms and even devices (iPaq, mobile browsers, CE machines), and so its probably justified.

HTH
Neil Smith.

At 08:13 20/03/2003 +0000, you wrote:
----------------------------------------------------------------------
Message-ID: <[EMAIL PROTECTED]>
From: "Bobo Wieland" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Date: Wed, 19 Mar 2003 22:29:22 +0100
MIME-Version: 1.0
Content-Type: text/plain;
        charset="Windows-1252"
Content-Transfer-Encoding: 7bit
Subject: Calculationg lines of text

When you're dealing with layout w text and images in documents on the web,
where the text/images is updatable by the client, it would be nice to be
able to calulate lines of text and charachters per line. Is there some way
to do this in php? If not, is it possible in some other language?
Javascript, maybe?


.bobo


--- End Message ---
--- Begin Message ---
I'e done this using COM, and hacked together a little PHP class
to do some things like inserting values and starting/stopping excel.

See the code for more of an idea:
http://hurring.com/code/php/excel_class/

(Note: it is v0.1a, which basically means i wrote it on Tuesday  :-)
check back at my site for more updates in the comign days/weeks)

(Im using this now in combination with GTK to develop a "standalone"
app for a Win32 machine.  Excel is great becuase the managers can
simply open the file and print it and dont have to use a separate program
to generate reports)

--
Scott Hurring <scotth at eac dot com>
Systems Programmer
EAC Corporation
---
"Ron Herhuth" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

Has anyone successfully used an Excel spreadsheet as a datasource?  I realize
that it is a flimsy datasource but I have a need to quickly and dynamically take
the information stored in spreadsheets and manipulate the data and write them to
a SQL database.

I would be grateful for any assistance or information on how to do this.

Thanks,
Ron



--- End Message ---

Reply via email to