|
Posted by Mityok on 04/20/07 10:18
On Apr 6, 8:43 pm, "Ciegalo" <damien.poc...@gmail.com> wrote:
> On 6 avr, 17:25, "Mityok" <mit...@gmail.com> wrote:
>
>
>
> > On Apr 6, 11:56 am, "Ciegalo" <damien.poc...@gmail.com> wrote:
>
> > > Hi to all,
> > > I'm getting my hands into PEAR for a small newsletter-sending project.
> > > I need to boost the performance of the sending script and came accross
> > > this mail_queue class that should queue the emails.
>
> > > After sweating over the pear installation on myWindows Machine (IIS,
> > > PHP 4.4.6, MySQL), I cannot even run the tutorial script.. I get :
> > > Fatal error: Cannot redeclare class
> > > mail_queue_container:mail_queue_container_db in p:\softs\php\pear\Mail
> > > \Queue\Container\db.php on line 44
>
> > > Any idea ? Nothing in the bugtracker of the package.
>
> > > Thanks in advance for your help !
>
> > > BR,
> > > Damien
>
> > Hello Damien,
>
> > You should check to use include_once (or require_once), not include
> > (or require) statements when you are including PEAR Mail functions to
> > your code.
>
> > Best Regards,
> > Mityok
>
> Hello,
> Thanks for the pointer, I had not thought about that. Yet, it does not
> solve the problem...
>
> Can it be something bad I've done during setup ? An incompatibility
> with IIS ? I'm using the code stroight out of the tutorial.
>
> Thanks again !
> Damien
Hello Damie.
No, this issue is not IIS specific.
The difference between include and include_once is that "include"
function will include given source file every time it occurs in your
source code, while "include_once" will include source file only if it
was not included before.
Example :
file : inc.php
<?php
print 'Included string!!!!<br/>';
?>
file inc_test.php
<?php
include 'inc.php';
include 'inc.php';
include 'inc.php';
?>
Output will be:
Included string!!!!<br/>
Included string!!!!<br/>
Included string!!!!<br/>
file inconce_test.php
<?php
include_once 'inc.php';
include_once 'inc.php';
include_once 'inc.php';
?>
Output will be:
Included string!!!!<br/>
BTW, read the manual, it rocks :)
Navigation:
[Reply to this message]
|