php-windows Digest 23 Jul 2001 22:30:18 -0000 Issue 665
Topics (messages 8447 through 8468):
how to show picture with php?
8447 by: Luk� Noskievi�
8450 by: Mike Flynn
Re: Printing text on a printer in PHP4 Using PRINTER function
8448 by: Mike Flynn
Re: Import filters
8449 by: Mike Flynn
8451 by: Michael Rudel
php vs Filemaker
8452 by: Christian St-Pierre
8453 by: Christian St-Pierre
8454 by: Christian St-Pierre
8455 by: Christian St-Pierre
cancel <[EMAIL PROTECTED]>
8456 by: Christian St-Pierre
8460 by: Christian St-Pierre
cancel <[EMAIL PROTECTED]>
8457 by: Christian St-Pierre
8459 by: Christian St-Pierre
cancel <[EMAIL PROTECTED]>
8458 by: Christian St-Pierre
Re: HTTP_SERVER_VARS["DOCUMENT_ROOT"] on IIS Windows 2000
8461 by: sysadmin.cheezy.net
8468 by: Stephen
cancel <[EMAIL PROTECTED]>
8462 by: Christian St-Pierre
cancel <[EMAIL PROTECTED]>
8463 by: Christian St-Pierre
cancel <[EMAIL PROTECTED]>
8464 by: Christian St-Pierre
cancel <[EMAIL PROTECTED]>
8465 by: Christian St-Pierre
cancel <[EMAIL PROTECTED]>
8466 by: Christian St-Pierre
Re: [PHP-DB] cancel <[EMAIL PROTECTED]>
8467 by: John Pickett
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]
----------------------------------------------------------------------
I have some pictures and i cannot find the way how to show them. I know the
name and location of the picture (d:\pictures\picture1.jpg, picture2.jpg,
...) I want to show just one picture which name i send through web form. Can
somebody help me?
Are they on the web server, i/e under the web root? If so, just show them
as you would ANY picture in HTML.
$picture = '/path/to/picture/picture1.jpg';
$width = 100;
$height = 50;
echo "<img src=\"$picture\" width=\"$width\" height=\"$height\"
border=\"0\" alt=\"My picture\">\n";
If they aren't then you will have to either move them to a folder under the
web root, or do one of two workarounds: copy them to a temp file under the
web root somewhere (which doesn't make much sense, because you will never
really know when that file should be deleted), or extract them via PHP with
a PHP script under your web root.
To extract them via a PHP page is a bit more difficult, but basically
involves something like this..
<img src="/path/showpic.php?picname=picture1.jpg">
And have the script look something like this:
----showpic.php----
header("Content-Disposition: filename=$picname");
header("Content-Type: $file_type");
header("Content-Length: $file_size");
readfile("/hard_drive_path/to/file/$picname");
-------------------
That's a rough sketch.
But again, the easiest way to do it is just move the picture files onto
somewhere on your web server and just access them like any picture, using
the <img> tag and having PHP fill in the file name.
-Mike
At 12:28 PM 7/23/2001 +0200, Luk� Noskievi� wrote:
>I have some pictures and i cannot find the way how to show them. I know the
>name and location of the picture (d:\pictures\picture1.jpg, picture2.jpg,
>...) I want to show just one picture which name i send through web form. Can
>somebody help me?
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
-=- Mike Flynn - Burlington, VT -=-
[EMAIL PROTECTED] http://www.mikeflynn.net/ * Give blood *
American schoolchildren today are taking four times as many
psychiatric meds as all of the rest of the world combined.
PHP is a server-side language. Thus, it cannot do anything on the
client-side. The printer functions are for the printers connected to the
web server with PHP.
-Mike
Hey Ziggi,
I asked this question a while back and the general consensus seemed to be
that there were no existing filters/modules to deal with Word/Excel
documents. Someone mentioned being able to open those programs on the
server side and doing stuff, but I don't think that would be of much use in
this situation. I was hoping to do the same thing -- I wanted to be able
to have people post meeting minutes in Word format but have them be
converted so as to be available to all via HTML.
Still no solution for me yet, sorry!
-Mike
At 12:10 PM 7/23/2001 +0200, Ziggi wrote:
>Hello !
>
>I just want to know is are ther any import filters interfacing between PHP
>and Word / Excel files, so that the content of these documents could be
>outputed to HTML ? I mean my customer wants to write new text in Word and he
>wants this text to be presented on their webpage. The text can be saved as
>.doc or .rtf. Thus PHP could access this file "suck" the text out of it and
>put it into HTML but how to ???
>
>Thanks for hints,
>Ziggi
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
-=- Mike Flynn - Burlington, VT -=-
[EMAIL PROTECTED] http://www.mikeflynn.net/ * Give blood *
American schoolchildren today are taking four times as many
psychiatric meds as all of the rest of the world combined.
Hi Ziggi, hi Mike,
... you could use COM to open the file on the server and then 'save as'
as html (word and excel can do this). Retrieve the html file and put
it back to the browser.
Sorry, no code snipplets, I haven't worked with COM, yet, but I think
this should work.
Any other - or opposite - opinion ?
Greetinx,
Mike
Michael Rudel
- Web-Development, Systemadministration -
Besuchen Sie uns am 20. und 21. August 2001 auf der
online-marketing-d�sseldorf in Halle 1 Stand E 16
_______________________________________________________________
Suchtreffer AG
Bleicherstra�e 20
D-78467 Konstanz
Germany
fon: +49-(0)7531-89207-17
fax: +49-(0)7531-89207-13
e-mail: mailto:[EMAIL PROTECTED]
internet: http://www.suchtreffer.de
_______________________________________________________________
> -----Original Message-----
> From: Mike Flynn [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 23, 2001 3:13 PM
> To: Ziggi; [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Import filters
>
>
> Hey Ziggi,
>
> I asked this question a while back and the general consensus
> seemed to be
> that there were no existing filters/modules to deal with Word/Excel
> documents. Someone mentioned being able to open those
> programs on the
> server side and doing stuff, but I don't think that would be
> of much use in
> this situation. I was hoping to do the same thing -- I
> wanted to be able
> to have people post meeting minutes in Word format but have them be
> converted so as to be available to all via HTML.
>
> Still no solution for me yet, sorry!
>
> -Mike
>
> At 12:10 PM 7/23/2001 +0200, Ziggi wrote:
> >Hello !
> >
> >I just want to know is are ther any import filters
> interfacing between PHP
> >and Word / Excel files, so that the content of these
> documents could be
> >outputed to HTML ? I mean my customer wants to write new
> text in Word and he
> >wants this text to be presented on their webpage. The text
> can be saved as
> >.doc or .rtf. Thus PHP could access this file "suck" the
> text out of it and
> >put it into HTML but how to ???
> >
> >Thanks for hints,
> >Ziggi
> >
> >
> >
> >--
> >PHP Windows Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>
>
> -=- Mike Flynn - Burlington, VT -=-
> [EMAIL PROTECTED] http://www.mikeflynn.net/ * Give blood *
> American schoolchildren today are taking four times as many
> psychiatric meds as all of the rest of the world combined.
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>
This might sound a little strange but I'd like to query a Filmeker
database using
Php. I read in the Filemaker manual that ODBC drivers let us be able to
query the
database using basic SQL calls. Meanwhile, I tried to perform the task
but it
seems quite complicated to acheive... As anyone done this before ? If
so, some
tips would be appreciated.
Thanks a lot,
Christ.
This might sound a little strange but I'd like to query a Filmeker
database using
Php. I read in the Filemaker manual that ODBC drivers let us be able to
query the
database using basic SQL calls. Meanwhile, I tried to perform the task
but it
seems quite complicated to acheive... As anyone done this before ? If
so, some
tips would be appreciated.
Thanks a lot,
Christ.
This might sound a little strange but I'd like to query a Filmeker
database using
Php. I read in the Filemaker manual that ODBC drivers let us be able to
query the
database using basic SQL calls. Meanwhile, I tried to perform the task
but it
seems quite complicated to acheive... As anyone done this before ? If
so, some
tips would be appreciated.
Thanks a lot,
Christ.
This might sound a little strange but I'd like to query a Filmeker
database using
Php. I read in the Filemaker manual that ODBC drivers let us be able to
query the
database using basic SQL calls. Meanwhile, I tried to perform the task
but it
seems quite complicated to acheive... As anyone done this before ? If
so, some
tips would be appreciated.
Thanks a lot,
Christ.
This message was cancelled from within Mozilla.
This message was cancelled from within Mozilla.
This message was cancelled from within Mozilla.
This message was cancelled from within Mozilla.
This message was cancelled from within Mozilla.
You do not have access to that information when running in CGI mode. It's a
bitch, but your options are limited:
1. if you're only running one domain with PHP, set the document_root
variable in php.ini
2. define(DOCUMENT_ROOT, "d:\inetpub\wwwroot\domain1") in each page, or an
include
3. the work-around that we use is to set a system environment variable that
can then be
accessed by the line: $HTTP_ENV_VARS["DOMAIN_DOCUMENT_ROOT"]. Our
solution can
be construed as dangerous because it theoretically allows any PHP site
on the box to
gain access to another doc root. However, since we have locked down
each site's
anonymous user to only have read/write permissions on their own wwwroot
(and exec
permissions on PHP.exe), they are unable to do anything with that
information.
hth,
-james.
To: [EMAIL PROTECTED]
Reply-To: "Stephen" <[EMAIL PROTECTED]>
From: "Stephen" <[EMAIL PROTECTED]>
Date: Sun, 22 Jul 2001 14:31:32 -0400
Subject: HTTP_SERVER_VARS["DOCUMENT_ROOT"] on IIS Windows 2000
Hi,
I've been trying to find information on this, and none of them directly tell
me what I am missing.
I have IIS on Windows 2000 Professional. I have installed PHP as a CGI
module via the installshield (phpinfo() runs ok, so the installation appears
ok).
I look at the list of server variables, and $DOCUMENT_ROOT is not listed.
I don't think this is the same as doc-root in the php.ini.
Can somebody advise as to what I am doing wrong?
I am trying not to install the ISAPI DLLs.
Thank you for your time.
--Stephen
James,
Thank you. This is precisely what I wanted to know and how to get around
this.
The define() idea is pretty ingenious. =)
Thanks,
Stephen
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "'Stephen'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 10:37 AM
Subject: Re: HTTP_SERVER_VARS["DOCUMENT_ROOT"] on IIS Windows 2000
> You do not have access to that information when running in CGI mode. It's
a
> bitch, but your options are limited:
>
> 1. if you're only running one domain with PHP, set the document_root
> variable in php.ini
>
> 2. define(DOCUMENT_ROOT, "d:\inetpub\wwwroot\domain1") in each page, or
an
> include
>
> 3. the work-around that we use is to set a system environment variable
that
> can then be
> accessed by the line: $HTTP_ENV_VARS["DOMAIN_DOCUMENT_ROOT"]. Our
> solution can
> be construed as dangerous because it theoretically allows any PHP
site
> on the box to
> gain access to another doc root. However, since we have locked down
> each site's
> anonymous user to only have read/write permissions on their own
wwwroot
> (and exec
> permissions on PHP.exe), they are unable to do anything with that
> information.
>
> hth,
> -james.
>
> To: [EMAIL PROTECTED]
> Reply-To: "Stephen" <[EMAIL PROTECTED]>
> From: "Stephen" <[EMAIL PROTECTED]>
> Date: Sun, 22 Jul 2001 14:31:32 -0400
> Subject: HTTP_SERVER_VARS["DOCUMENT_ROOT"] on IIS Windows 2000
>
> Hi,
> I've been trying to find information on this, and none of them directly
tell
> me what I am missing.
>
> I have IIS on Windows 2000 Professional. I have installed PHP as a CGI
> module via the installshield (phpinfo() runs ok, so the installation
appears
> ok).
>
> I look at the list of server variables, and $DOCUMENT_ROOT is not listed.
>
> I don't think this is the same as doc-root in the php.ini.
>
> Can somebody advise as to what I am doing wrong?
> I am trying not to install the ISAPI DLLs.
>
> Thank you for your time.
>
> --Stephen
>
>
This message was cancelled from within Mozilla.
This message was cancelled from within Mozilla.
This message was cancelled from within Mozilla.
This message was cancelled from within Mozilla.
This message was cancelled from within Mozilla.
I hope you didn't have anything *too* important to say Christian... That
spamming earned an email filter REAL quick. Cheers!
My 2 �
John Pickett
http://www.bvstudios.com/
Co-Author: Inside Dreamweaver 4
http://www.amazon.com/exec/obidos/ASIN/0735710848/xtremist
----- Original Message -----
From: "Christian St-Pierre" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 9:01 AM
Subject: [PHP-DB] cancel <[EMAIL PROTECTED]>
> This message was cancelled from within Mozilla.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>