Re: Mail.php - newbie question

From: Date: Thu, 23 Sep 2004 14:10:03 +0000
Subject: Re: Mail.php - newbie question
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14614@lists.php.net to get a copy of this message
* Oscar Karlsson <lzr@home.se>: > --=====================_14889640==.ALT > Content-Type: text/plain; charset="us-ascii"; format=flowed > > Hi there! > > I tried this simple mail example script and got the following error: > > Fatal error: Cannot redeclare class mail in > /customers/lzr.se/lzr.se/httpd.www/includes/Mail.php on line 33 > > Anyone have any suggestions? > > <html> > <title>test</title> > <body> > <?php > ini_set("include_path", '/customers/lzr.se/lzr.se/httpd.www/includes/' . > PATH_SEPARATOR . ini_get("include_path")); > require_once 'PEAR.php'; > require_once 'Mail.php'; > include('Mail.php'); ^^^^^^^^^^^^^^^^^^^^ Here's your problem; you're already require_once'd the Mail.php file. Remove the "include('Mail.php');" line and it should work. -- Matthew Weier O'Phinney | mailto:matthew@garden.org Webmaster and IT Specialist | http://www.garden.org National Gardening Association | http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org

« previous php.pear.general (#14614) next »