php-windows Digest 16 Nov 2003 11:26:54 -0000 Issue 2002

Topics (messages 22105 through 22115):

Re: script to update file names
        22105 by: Trystano.aol.com

Object Oriented
        22106 by: Rocco CAstoro
        22107 by: GaguWD
        22108 by: Rocco CAstoro

PHP in general
        22109 by: Rocco CAstoro
        22110 by: GaguWD
        22111 by: Rocco CAstoro
        22112 by: Rocco CAstoro
        22113 by: GaguWD

PHP CODE ERROR?
        22114 by: Rocco CAstoro

capturing the output to a file rather than the browser
        22115 by: Brent

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 ---
Could you explain that query a little more please?

Tryst

--- End Message ---
--- Begin Message ---
I'm reading Sams teach yourself PHP4 in 24 Hours, printed in 2000, and It
seems to be out of date with the current versions of PHP because when i try
to do the example:

<?php
$obj1 = new first_class();
$obj2 = new first_class();
print "\$obj1 is a ".gettype($obj1)."<br>";
print "\$obj2 is a ".gettype($obj2)."<br>";
?>

It says Fatal error: Cannot instantiate non-existent class: first_class in
C:\Program Files\Apache Group\Apache2\htdocs\Hour8-1.php on line 2

Why is this? Thanks

--- End Message ---
--- Begin Message ---
You need to include the class in the script for it to work. You are calling
a class that isn't on the file.

Bye!
MG29

-----Mensaje original-----
De: Rocco CAstoro [mailto:[EMAIL PROTECTED]
Enviado el: Sábado, 15 de Noviembre de 2003 08:07 p.m.
Para: [EMAIL PROTECTED]
Asunto: [PHP-WIN] Object Oriented


I'm reading Sams teach yourself PHP4 in 24 Hours, printed in 2000, and It
seems to be out of date with the current versions of PHP because when i try
to do the example:

<?php
$obj1 = new first_class();
$obj2 = new first_class();
print "\$obj1 is a ".gettype($obj1)."<br>";
print "\$obj2 is a ".gettype($obj2)."<br>";
?>

It says Fatal error: Cannot instantiate non-existent class: first_class in
C:\Program Files\Apache Group\Apache2\htdocs\Hour8-1.php on line 2

Why is this? Thanks

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Thanks Much

"Gaguwd" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> You need to include the class in the script for it to work. You are
calling
> a class that isn't on the file.
>
> Bye!
> MG29
>
> -----Mensaje original-----
> De: Rocco CAstoro [mailto:[EMAIL PROTECTED]
> Enviado el: Sábado, 15 de Noviembre de 2003 08:07 p.m.
> Para: [EMAIL PROTECTED]
> Asunto: [PHP-WIN] Object Oriented
>
>
> I'm reading Sams teach yourself PHP4 in 24 Hours, printed in 2000, and It
> seems to be out of date with the current versions of PHP because when i
try
> to do the example:
>
> <?php
> $obj1 = new first_class();
> $obj2 = new first_class();
> print "\$obj1 is a ".gettype($obj1)."<br>";
> print "\$obj2 is a ".gettype($obj2)."<br>";
> ?>
>
> It says Fatal error: Cannot instantiate non-existent class: first_class in
> C:\Program Files\Apache Group\Apache2\htdocs\Hour8-1.php on line 2
>
> Why is this? Thanks
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
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?

--- End Message ---
--- Begin Message ---
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 ---
--- Begin Message ---
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 ---
--- Begin Message ---
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 ---
--- Begin Message ---
I don't really support PHP books, since they seem to be made for economical
purposes only. I recommend to look on the web for tutorials, made by and for
programmers (advanced or novice). They are simple, free and useful.

I know it might be tedious for some people to read on the PC, but think
about your pockets and the knowledge you'll gain with a simple tutorial from
Mr. Nobody, than with the book of Mr. (insert any PHP book writer here).

I'm not against anyone in particular, just dislike programming books. We
have thousands of mini-books on the web, why buy a "big" one?

So, visit www.google.com and search around, you'll come up with lots of
tutorials. Also, an advice, when you learn the basics, put yourself a goal.
Like, do a PHP project script and then look for especific topics about PHP.
Don't try to learn ALL the language just because.

The basics are: variables, control structures (if-else, while, for, switch,
foreach, etc.), functions and object oriented programming. With that, you'll
be able to go anywhere.

Oh, and download a copy of the PHP Manual at www.php.net. You can study from
there too, though it's worst than the book if you don't know how to program
at all.

That's all for now, hope all this is useful to you! :D
MG29

-----Mensaje original-----
De: Rocco CAstoro [mailto:[EMAIL PROTECTED]
Enviado el: Sábado, 15 de Noviembre de 2003 10:11 p.m.
Para: [EMAIL PROTECTED]
Asunto: 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 ---
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

--- End Message ---
--- Begin Message ---
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 ---

Reply via email to