php-general Digest 22 Aug 2004 16:02:31 -0000 Issue 2951
Topics (messages 194409 through 194425):
Reading the documentation
194409 by: Octavian Rasnita
194411 by: M. Sokolewicz
194412 by: Octavian Rasnita
Re: avi to wmv convert
194410 by: hitek
Sending email
194413 by: Octavian Rasnita
194414 by: M. Sokolewicz
194415 by: zareef ahmed
194417 by: Octavian Rasnita
Class Con- and Destructor Inheritance
194416 by: Daniel Schierbeck
OO in PHP5.0 - Referencing Object or not?!
194418 by: Raffael Wannenmacher
194421 by: Daniel Schierbeck
Commercial Java Extention for php 5
194419 by: Alawi albaity
Re: managing cvs from php
194420 by: robert mena
Text from file into database
194422 by: Phpu
194423 by: John Holmes
194424 by: Daniel Schierbeck
194425 by: raditha dissanayake
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 ---
Hi all,
I have 2 questions:
1. Do PHP libraries have a documentation included inside of them like in
case of Perl's modules?
2. If yes, how can I read that documentation?
Thank you.
Teddy
--- End Message ---
--- Begin Message ---
Octavian Rasnita wrote:
Hi all,
I have 2 questions:
1. Do PHP libraries have a documentation included inside of them like in
case of Perl's modules?
2. If yes, how can I read that documentation?
Thank you.
Teddy
that would depend on what you understand under the term "PHP libraries",
if you mean the actual C files, then no, if you mean the PHP extensions,
eg. mysql, mcrypt, XML, etc. then yes, they do have documentation (most
of them), which can be found in the PHP Manual available on php.net. If
you're talking about the PECL extensions, then they usually don't have
much, if any, documentation about it. It basically means you'd need to
read the C code for it and find out yourself...
hope that helped,
- Tul
--- End Message ---
--- Begin Message ---
Ok, thank you.
Well, it seems that PHP libraries don't have the documentation included...
This is too bad, because it is much harder to search in the PHP manual, and
some libraries that might be downloaded from different sites and made by
different programmers won't have the documentation included in the PHP
manual.
I thought PHP also have a kind of program like perldoc for perl which can
display the documentation for a built in function, for a library that was
installed, plus different tutorials...
I guess it would be a good idea to implement such a thing in PHP also,
including a documentation in comments, with some special marks...
Teddy
----- Original Message -----
From: "M. Sokolewicz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 22, 2004 11:29 AM
Subject: [PHP] Re: Reading the documentation
> Octavian Rasnita wrote:
> > Hi all,
> >
> > I have 2 questions:
> >
> > 1. Do PHP libraries have a documentation included inside of them like in
> > case of Perl's modules?
> >
> > 2. If yes, how can I read that documentation?
> >
> > Thank you.
> >
> > Teddy
> that would depend on what you understand under the term "PHP libraries",
> if you mean the actual C files, then no, if you mean the PHP extensions,
> eg. mysql, mcrypt, XML, etc. then yes, they do have documentation (most
> of them), which can be found in the PHP Manual available on php.net. If
> you're talking about the PECL extensions, then they usually don't have
> much, if any, documentation about it. It basically means you'd need to
> read the C code for it and find out yourself...
>
> hope that helped,
> - Tul
--- End Message ---
--- Begin Message ---
Try looking up ffmpeg. It can convert between many video formats, runs on
linux or windows(compile under mingw) and can be called via backtick,
system() or exec() functions. I use it from a php script to convert flash
FLV files to MPG.
At 04:03 AM 8/21/2004, Peter Clarke wrote:
John Nichel wrote:
Peter Clarke wrote:
John Nichel wrote:
Jay Blanchard wrote:
[snip]
In what manual?
[/snip]
TFM!
I'm sorry, I didn't quite catch that. Could you hold my hand, and
point it out to me? If you were a real pal, you would write the code
for me too. ;)
The only manual I know of is at www.php.net
It provides a tool for searching the online documentation.
Searching for 'avi' produces just one result of:
http://www.php.net/function.getimagesize
in which a user posts about finding dimensions etc from media files.
I cannot find anywhere that mentions converting avi files to wmv files.
The point of the razzing is to get one to do some research. If you don't
see it in the manual, chances are PHP cannot do it on it's own. Without
seeing any 'video' functions listed in 'THE MANUAL', I would hazard a
guess that converting between two different video formats is a bit beyond
the scope of PHP. Not to say that this cannot be done, as I'm sure there
is an API out there that PHP can interact with, but someplace like Google
would be a better place to start a search like there.
Agreed, my issue is with the pure unhelpfulness of the responses to the
question. The response was:
"There are a few listed in the manual."
which is totally wrong.
Peter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi all,
I want to send a test message with the following specifications:
1. The message is sent by [EMAIL PROTECTED]
2. The message is sent to the following recipients: [EMAIL PROTECTED],
[EMAIL PROTECTED]
3. The message has the subject: [EMAIL PROTECTED]
4. The message has the following header:
From: Me<[EMAIL PROTECTED]
To: Multiple recipients<recipients.info>
5. The body of the message is:
Test
Can I use mail() function for this?
Thank you.
Teddy
--- End Message ---
--- Begin Message ---
Octavian Rasnita wrote:
Hi all,
I want to send a test message with the following specifications:
1. The message is sent by [EMAIL PROTECTED]
2. The message is sent to the following recipients: [EMAIL PROTECTED],
[EMAIL PROTECTED]
3. The message has the subject: [EMAIL PROTECTED]
4. The message has the following header:
From: Me<[EMAIL PROTECTED]
To: Multiple recipients<recipients.info>
5. The body of the message is:
Test
Can I use mail() function for this?
Thank you.
Teddy
sure you can :)
just do
mail('[EMAIL PROTECTED], [EMAIL PROTECTED]', '[EMAIL PROTECTED]',
'test', 'From: Me <[EMAIL PROTECTED]>');
more info:
(http://www.php.net/manual/en/function.mail.php)
--- End Message ---
--- Begin Message ---
Hi Octavian Rasnita,
Yes You can use mail() function for this purpose.
Just separate each reciepent address by a comma (,) .
$to="[EMAIL PROTECTED],[EMAIL PROTECTED]";
$header="from:Me <[EMAIL PROTECTED]> \r\n";
$subject="[EMAIL PROTECTED]";
$body="test";
mail($to, $subject, $body, $header);
Will do the needfull.
zareef ahmed
--- Octavian Rasnita <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I want to send a test message with the following
> specifications:
>
> 1. The message is sent by [EMAIL PROTECTED]
>
> 2. The message is sent to the following recipients:
> [EMAIL PROTECTED],
> [EMAIL PROTECTED]
>
> 3. The message has the subject: [EMAIL PROTECTED]
>
> 4. The message has the following header:
> From: Me<[EMAIL PROTECTED]
> To: Multiple recipients<recipients.info>
>
> 5. The body of the message is:
>
> Test
>
> Can I use mail() function for this?
>
> Thank you.
>
> Teddy
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
=====
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush
--- End Message ---
--- Begin Message ---
Thank you all, but how can I send the message from the [EMAIL PROTECTED] email
adress, but in the header of the message to put [EMAIL PROTECTED]
Something like giving the following commands to an SMTP server:
telnet mail.server.com 25
helo mail.server.com
mail from:[EMAIL PROTECTED]
rcpt to: [EMAIL PROTECTED]
data
From: Two<[EMAIL PROTECTED]>
To: ZZZ<[EMAIL PROTECTED]>
Subject: subject
test body
.
So the message is sent from the [EMAIL PROTECTED] email address and goes to
[EMAIL PROTECTED]
But when the message is received, it appears with the data from the body of
the message (after the "data" command), meaning from [EMAIL PROTECTED] to
[EMAIL PROTECTED]
And another question is why it appears the following error message (under
Windows 2000):
PHP Warning: mail(): "sendmail_from" not set in php.ini or custom "From:"
header missing in...
I don't want to set that in php.ini, but I have put "From: [EMAIL PROTECTED]"
as the fourth parameter of the mail() function, however, it still gives me
that error.
I am running a local smtp server.
Thank you much.
Teddy
----- Original Message -----
From: "M. Sokolewicz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 22, 2004 1:31 PM
Subject: [PHP] Re: Sending email
> Octavian Rasnita wrote:
>
> > Hi all,
> >
> > I want to send a test message with the following specifications:
> >
> > 1. The message is sent by [EMAIL PROTECTED]
> >
> > 2. The message is sent to the following recipients: [EMAIL PROTECTED],
> > [EMAIL PROTECTED]
> >
> > 3. The message has the subject: [EMAIL PROTECTED]
> >
> > 4. The message has the following header:
> > From: Me<[EMAIL PROTECTED]
> > To: Multiple recipients<recipients.info>
> >
> > 5. The body of the message is:
> >
> > Test
> >
> > Can I use mail() function for this?
> >
> > Thank you.
> >
> > Teddy
> sure you can :)
>
> just do
> mail('[EMAIL PROTECTED], [EMAIL PROTECTED]', '[EMAIL PROTECTED]',
> 'test', 'From: Me <[EMAIL PROTECTED]>');
>
> more info:
> (http://www.php.net/manual/en/function.mail.php)
>
> --
--- End Message ---
--- Begin Message ---
Hello there. I was experimenting a bit with the constructors and
destructors, and found that this code:
<?php
class First
{
public function __construct ()
{
echo "Hello, World!\n";
}
public function __destruct ()
{
echo "Goodbye, World!\n";
}
}
class Second extends First
{
}
$second = new Second;
?>
Outputs
Hello, World!
Goodbye, World!
, yet the PHP manual
(http://www.php.net/manual/en/language.oop5.decon.php) says:
Note: Parent constructors are not called implicitly. In order
to run a parent constructor, a call to parent::__construct() is
required.
Is this an error in the manual or in PHP itself? Should I report it
somewhere?
--- End Message ---
--- Begin Message ---
hello together
look at the following code ...
why is this ..
-- code start
if ( is_object($this->getManagerObject()->getDataFieldManager()) )
{
for ( $j = 0; $j <
$this->getManagerObject()->getDataFieldManager()->getCount(); $j++ )
{
if (
$this->getManagerObject()->getDataFieldManager()->m_objData[$j]['GI_ID']
== $this->getID() )
{
$l_objDataField = new GalleryDataField(
$this->getManagerObject()->getDataFieldManager(),
$this->getManagerObject()->getDataFieldManager()->m_objData[$j]
);
$l_objDataField->generateXML();
$l_strData .= $l_objDataField->getXML();
unset($l_objDataField);
}
}
}
-- code end
.. about 2 seconds slower than this ..
-- code start
$l_objDataFieldManager =
$this->getManagerObject()->getDataFieldManager();
if ( is_object( $l_objDataFieldManager ) )
{
for ( $j = 0; $j < $l_objDataFieldManager->getCount(); $j++ )
{
if ( $l_objDataFieldManager->m_objData[$j]['GI_ID'] ==
$this->getID() )
{
$l_objDataField = new GalleryDataField(
$l_objDataFieldManager,
$l_objDataFieldManager->m_objData[$j]
);
$l_objDataField->generateXML();
$l_strData .= $l_objDataField->getXML();
unset($l_objDataField);
}
}
}
unset($l_objDataFieldManager);
-- code end
???
i just read, that objects in php 5 automatically returned as reference?
in my code it doesn't seems like that!!
ps: variable m_objData contains a lot of data from a mysql db
thanks for answers.
--- End Message ---
--- Begin Message ---
Raffael Wannenmacher wrote:
hello together
look at the following code ...
why is this ..
-- code start
if ( is_object($this->getManagerObject()->getDataFieldManager()) )
{
for ( $j = 0; $j <
$this->getManagerObject()->getDataFieldManager()->getCount(); $j++ )
{
if (
$this->getManagerObject()->getDataFieldManager()->m_objData[$j]['GI_ID']
== $this->getID() )
{
$l_objDataField = new GalleryDataField(
$this->getManagerObject()->getDataFieldManager(),
$this->getManagerObject()->getDataFieldManager()->m_objData[$j]
);
$l_objDataField->generateXML();
$l_strData .= $l_objDataField->getXML();
unset($l_objDataField);
}
}
}
-- code end
.. about 2 seconds slower than this ..
-- code start
$l_objDataFieldManager =
$this->getManagerObject()->getDataFieldManager();
if ( is_object( $l_objDataFieldManager ) )
{
for ( $j = 0; $j < $l_objDataFieldManager->getCount(); $j++ )
{
if ( $l_objDataFieldManager->m_objData[$j]['GI_ID'] ==
$this->getID() )
{
$l_objDataField = new GalleryDataField(
$l_objDataFieldManager,
$l_objDataFieldManager->m_objData[$j]
);
$l_objDataField->generateXML();
$l_strData .= $l_objDataField->getXML();
unset($l_objDataField);
}
}
}
unset($l_objDataFieldManager);
-- code end
???
i just read, that objects in php 5 automatically returned as reference?
in my code it doesn't seems like that!!
ps: variable m_objData contains a lot of data from a mysql db
thanks for answers.
As you can read in some of the posts here, it only SEEMS like the
objects are passed by reference (it's a conspiracy!). I'm not sure if
it'll help you, but try using the ampersand (&) symbol to force
passing-by-reference.
Cheers,
Daniel
--- End Message ---
--- Begin Message ---
Is there any commercial java extention for php 5 ?
--- End Message ---
--- Begin Message ---
Michal,
The directories have a 777 (ok unsecure but just a test) setting.
Any tips of how can I get the stderr or a better way to do this cvs interface ?
On Thu, 19 Aug 2004 11:45:26 -0400 (EDT), Michal Migurski
<[EMAIL PROTECTED]> wrote:
> > $cmd = "cd ".$pathToFile." ; /usr/bin/cvs ci -m '".$logMsg."' ".$file ;
> >
> > passthru($cmd) ;
> >
> > If I echo the $cmd and paste in a shell the command works. When I
> > execute from web nothing happens and no output is seen
> > (error_reporting(E_ALL))
>
> Does the apache user have read/write privileges on the files in that
> directory? CVS makes heavy usage of stderr, so that may be a reason you
> are not seeing output.
>
> ---------------------------------------------------------------------
> michal migurski- contact info and pgp key:
> sf/ca http://mike.teczno.com/contact.html
>
>
--- End Message ---
--- Begin Message ---
Hi,
I have a file, test.txt. The containig of this file is:
line 1
line 2
line 3
------
and so on
I want to create a script that will read each line of the file and insert it to
database.
I am new to php and maybe you could help me
Thanks
--- End Message ---
--- Begin Message ---
Phpu wrote:
Hi,
I have a file, test.txt. The containig of this file is:
line 1
line 2
line 3
------
and so on
I want to create a script that will read each line of the file and insert it to
database.
I am new to php and maybe you could help me
http://us2.php.net/fopen
http://us2.php.net/fgets
Then try the chapter in the manual for whatever database you're using...
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Phpu wrote:
Hi,
I have a file, test.txt. The containig of this file is:
line 1
line 2
line 3
------
and so on
I want to create a script that will read each line of the file and insert it to
database.
I am new to php and maybe you could help me
Thanks
I depends on what kind of database you wish to use (you probably have
MySQL, though PostgreSQL would be preferable). If you have a large
amount of lines I recommend you use prepared statements. But first of
all, tell us which database you're going to use.
Cheers,
Daniel
--- End Message ---
--- Begin Message ---
Phpu wrote:
Hi,
I have a file, test.txt. The containig of this file is:
line 1
line 2
line 3
------
and so on
I want to create a script that will read each line of the file and insert it to database.
I am new to php and maybe you could help me
for just two columns of data this could be just a waste of effort unless
you have several thousand records.
BTW as someone already mentioned to another poster you should not use
PHP* as your name when posting.
Thanks
--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--- End Message ---