php-windows Digest 17 Nov 2003 00:03:24 -0000 Issue 2003
Topics (messages 22116 through 22121):
Re: capturing the output to a file rather than the browser
22116 by: Donatas
Re: GD Lib
22117 by: DvDmanDT
22121 by: S F Alim
Re: PHP CODE ERROR?
22118 by: Svensson, B.A.T. (HKG)
Re: PHP in general
22119 by: Roy Henderson
22120 by: DvDmanDT
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 ---
Yep, what you need is called output buffering.
read about ob_start (); and other ob_* (); functions in PHP manual.
Donny
Brent wrote:
Hi,
Wondering if anyone can help!.
I am trying to run a file like this after a submit from a form.
<form action="showmatches.php" target="new">
..
..
</form>
My question is! Is there anyway using PHP to capture the output
that is displayed above in a new window when the 'showmatches.php'
is run to a file instead. Kinda like viewing the source once in the
browser but instead it's going straight to a file on the server
automatically.
Thanks,
Brent.
--- End Message ---
--- Begin Message ---
in php.ini, change the extension_dir variable, then uncomment
';extension=php_gd2.dll' (remove the ; at the beginning of the line)...
--
// DvDmanDT
MSN: dvdmandt€hotmail.com
Mail: dvdmandt€telia.com
##########################
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenter&hcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##########################
"S F Alim" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
>
>
> Hi all,
> I m running PHP 4.3.3 on IIS 5.0, and I believe that I don't have GD
> library installed or it's not working, and im totally new to this, so
> if any kind enuff to tell me where shall I look and how can I install
> (if its not there).
> Thanks in advance.
> Regards,
> S F Alim.
>
>
>
>
--- End Message ---
--- Begin Message ---
Thanx DvDmanDT
Problem is solved but I had to specify path for CACHE_DIR and TTF_DIR in
my jpgraph.php in order to run the graph.
Thanks a lot buddy.
Regards,
S F Alim.
Tech Support,
Technical Deptt.,
VodaTel Riyadh.
Date: November 17, 2003
-----Original Message-----
From: DvDmanDT [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 16, 2003 3:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: GD Lib
in php.ini, change the extension_dir variable, then uncomment
';extension=php_gd2.dll' (remove the ; at the beginning of the line)...
--
// DvDmanDT
MSN: dvdmandt€hotmail.com
Mail: dvdmandt€telia.com
##########################
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenter&hcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
ml
##########################
"S F Alim" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
>
>
> Hi all,
> I m running PHP 4.3.3 on IIS 5.0, and I believe that I don't have GD
> library installed or it's not working, and im totally new to this, so
> if any kind enuff to tell me where shall I look and how can I install
> (if its not there).
> Thanks in advance.
> Regards,
> S F Alim.
>
>
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
http://www.php.net/manual/en/language.oop.php
-----Original Message-----
From: Rocco CAstoro
To: [EMAIL PROTECTED]
Sent: 16-11-2003 6:58
Subject: [PHP-WIN] PHP CODE ERROR?
Can Anyone tell my why this error is produced:
Fatal error: Call to undefined function: addrow() in C:\Program
Files\Apache\Group\Apache2\htdocs\Hour8-7MainExample.php on line 63
>From this code:
<?php
// Defining the Class's Properties -------
class Table
{
var $table_array = array();
var $headers = array();
var $cols;
}
//Creating a Constructor ------
function Table( $headers )
{
$this->headers = $headers;
$this->cols = count ( $headers );
}
//The addROw() Method ------
function addRow( $row )
{
if ( count ($row) != $this->cols )
return false;
array_push($this->table_array, $row);
return true;
}
//The addRowAssocArray() Method
function addRowAssocArray( $row_assoc )
{
$row = array();
foreach ( $this->headers as $header )
{
if ( ! isset( $row_assoc[$header] ))
$row_assoc[$header] = "";
$row[] = $row_assoc[$header];
}
array_push($this->table_array, $row);
return true;
}
//
function output()
{
print "<pre>";
foreach ( $this->headers as $header )
print "<B>$header</B> ";
print "\n";
foreach ( $this->table_array as $y )
{
foreach ( $y as $xcell )
print "$xcell ";
print "\n";
}
print "</pre>";
}
$test = new table( array("a", "b", "c") );
$test->addRow( array(1,2,3) );
$test->addRow( array(4,5,6) );
$test->addRowAssocArray (array ( b=>0, a=>6, c=>3 ) );
$test->output();
?>
Thanks Alot guys your MUCHos HHelpos
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
This sounds just a little like having a solution and trying to find a
problem to go with it ... The bottom line is that you can do lots of things
with PHP but you would probably be best actually having an objective in mind
...then you would be able to learn how to use PHP in the context of
developing a solution ...
-----Original Message-----
From: Rocco CAstoro [mailto:[EMAIL PROTECTED]
Sent: 16 November 2003 01:11
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] PHP in general
Yes it does, But IM lost in a space full of variables and strings and I dont
know what half of them mean, I dont wanna give up but this book SUCKS....
"Gaguwd" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Wellllllllll, it depends on what you want to make. PHP has almost no
limits.
> Since it works with FTP, MySQL and many other external languages,
protocols
> and the like, your imagination is the limit.
>
> So, it's used for many things. There are blog scripts, guestbooks,
counters,
> database managers, portal managers, forum managers, email systems, RPG
> games, and lots of etc.
>
> Hope it helps...
>
> Bye!
> MG29
>
> -----Mensaje original-----
> De: Rocco CAstoro [mailto:[EMAIL PROTECTED] Enviado el:
> Sábado, 15 de Noviembre de 2003 09:14 p.m.
> Para: [EMAIL PROTECTED]
> Asunto: [PHP-WIN] PHP in general
>
>
> I'm learning PHP for reasons I dont know... I just feel that with my
passion
> for code and computers, that I will be able to use this information to
> create great things... I guess my question is, what all is PHP used
> for anyways?
>
> --
> PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
The first
} should be after the last } for addRow() to be a method.. lol... Like this
(didn't try, but seems correct):
<html>
<head>
<title>A Class with a Constructor</title>
</head>
<body>
<?php
// Defining the Class's Properties -------
class Table
{
var $table_array = array();
var $headers = array();
var $cols;
//Creating a Constructor ------
function Table( $headers )
{
$this->headers = $headers;
$this->cols = count ( $headers );
}
//The addROw() Method ------
function addRow( $row )
{
if ( count ($row) != $this->cols )
return false;
array_push($this->table_array, $row);
return true;
}
//The addRowAssocArray() Method
function addRowAssocArray( $row_assoc )
{
$row = array();
foreach ( $this->headers as $header )
{
if ( ! isset( $row_assoc[$header] ))
$row_assoc[$header] = "";
$row[] = $row_assoc[$header];
}
array_push($this->table_array, $row);
return true;
}
//
function output()
{
print "<pre>";
foreach ( $this->headers as $header )
print "<B>$header</B> ";
print "\n";
foreach ( $this->table_array as $y )
{
foreach ( $y as $xcell )
print "$xcell ";
print "\n";
}
print "</pre>";
}
}
$test = new table( array("a", "b", "c") );
$test->addRow( array(1,2,3) );
$test->addRow( array(4,5,6) );
$test->addRowAssocArray (array ( b=>0, a=>6, c=>3 ) );
$test->output();
?>
</body>
</html>
--
// DvDmanDT
MSN: dvdmandt€hotmail.com
Mail: dvdmandt€telia.com
##########################
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenter&hcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##########################
"Rocco Castoro" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> ok, this is gunna be annoying but does anyone know why i get this error:
> Fatal error: Call to undefined function: addrow() in C:\Program
Files\Apache
> Group\Apache2\htdocs\Hour8-7MainExample.php on line 63 when trying to
> execute this code:
>
> <html>
> <head>
> <title>A Class with a Constructor</title>
> </head>
> <body>
> <?php
>
> // Defining the Class's Properties -------
> class Table
> {
> var $table_array = array();
> var $headers = array();
> var $cols;
> }
>
> //Creating a Constructor ------
> function Table( $headers )
> {
> $this->headers = $headers;
> $this->cols = count ( $headers );
> }
>
> //The addROw() Method ------
> function addRow( $row )
> {
> if ( count ($row) != $this->cols )
> return false;
> array_push($this->table_array, $row);
> return true;
> }
>
> //The addRowAssocArray() Method
> function addRowAssocArray( $row_assoc )
> {
> $row = array();
> foreach ( $this->headers as $header )
> {
> if ( ! isset( $row_assoc[$header] ))
> $row_assoc[$header] = "";
> $row[] = $row_assoc[$header];
> }
> array_push($this->table_array, $row);
> return true;
> }
>
> //
> function output()
> {
> print "<pre>";
> foreach ( $this->headers as $header )
> print "<B>$header</B> ";
> print "\n";
> foreach ( $this->table_array as $y )
> {
> foreach ( $y as $xcell )
> print "$xcell ";
> print "\n";
> }
> print "</pre>";
> }
>
> $test = new table( array("a", "b", "c") );
> $test->addRow( array(1,2,3) );
> $test->addRow( array(4,5,6) );
> $test->addRowAssocArray (array ( b=>0, a=>6, c=>3 ) );
> $test->output();
> ?>
> </body>
> </html>
>
> thanks
> "Rocco Castoro" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Yes it does, But IM lost in a space full of variables and strings and I
> dont
> > know what half of them mean, I dont wanna give up but this book
SUCKS....
> > "Gaguwd" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > Wellllllllll, it depends on what you want to make. PHP has almost no
> > limits.
> > > Since it works with FTP, MySQL and many other external languages,
> > protocols
> > > and the like, your imagination is the limit.
> > >
> > > So, it's used for many things. There are blog scripts, guestbooks,
> > counters,
> > > database managers, portal managers, forum managers, email systems, RPG
> > > games, and lots of etc.
> > >
> > > Hope it helps...
> > >
> > > Bye!
> > > MG29
> > >
> > > -----Mensaje original-----
> > > De: Rocco CAstoro [mailto:[EMAIL PROTECTED]
> > > Enviado el: Sábado, 15 de Noviembre de 2003 09:14 p.m.
> > > Para: [EMAIL PROTECTED]
> > > Asunto: [PHP-WIN] PHP in general
> > >
> > >
> > > I'm learning PHP for reasons I dont know... I just feel that with my
> > passion
> > > for code and computers, that I will be able to use this information to
> > > create great things... I guess my question is, what all is PHP used
for
> > > anyways?
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---