mindre kapital

Magazine
Go Back   Computer Juice > Computer Software > Web Design, Hosting & SEO

Register


 Default 

Päron post




Reply
 
Thread Tools
  #1  
Old 30 mars 2008, 12:21
Ledamot Gruppen
 
Default Päron post

Hej alla im har ett problem med Päron mail.php

IM får detta felmeddelande

Fatal errorKlass "mail" som inte finns i \ PEAR \ mail.php on-line 26

här är min kod

[php]
<? php
/ / Referens Mail PEAR biblioteket
require_once 'Mail.php';
/ / Main klass, används för att erhålla för information,
/ / Run rörledning sektioner, revision order, etc.
klass OrderProcessor
(
public $ mOrderId;
public $ mOrderStatus;
public $ mConnection;
public $ mConfiguration;
public $ mContinueNow;
private $ mCurrentCustomer;
private $ mCurrentOrderDetails;
private $ mOrderManager;
private $ mReference;
private $ mAuthCode;
/ / Constructor skapar DoOrderManager exempel
funktion __construct ()
(
$ this-> mOrderManager = new DoOrderManager ();
)
/ / Process anropas från checkout.php och orders_admin.php att behandla en
/ / Order, den första parametern är ID för den ordning och den andra
/ / Parameter är ett OrderProcessorConfiguration instans.
public function Process (newOrderId $, $ newConfiguration)
(
/ / Set ordernumret
$ this-> mOrderId = $ newOrderId;
/ / Configure processor
$ this-> mConfiguration = $ newConfiguration;
$ this-> mContinueNow = true;
/ / Log start av verkställighet
$ this-> AddAudit ( "Order Processor igång.", 10000);
/ / Erhålla status för
$ this-> mOrderStatus = $ this-> mOrderManager-> GetOrderStatus ($ this-> mOrderId);
/ / Process rörledningsavsnittet
försöka
(
while ($ this-> mContinueNow)
(
$ this-> mContinueNow = false;
$ cps = $ this-> GetCurrentPipelineSection ();
$ cps-> Process ($ this);
)
)
catch (Exception $ e)
(
trigger_error ( "Exception". $ e-> getMessage (). "på".
$ e-> getFile (). "Line". $ e-> getline ());
$ this-> MailAdmin ( "Order Processing fel ocured." $ e-> getMessage ());
$ this-> AddAudit ( "Order Processing fel ocured.", 10002);
throw new Exception ( "processor error");
)
$ this-> AddAudit ( "Order Processor färdig.", 10001);
)
/ / Blir ett föremål instans som representerar den aktuella rörledningsavsnittet
privata tillställningar GetCurrentPipelineSection ()
(
switch ($ this-> mOrderStatus)
(
Vid 0:
$ this-> mCurrentPipelineSection = new PsInitialNotification (); break;
Fall 1:
$ this-> mCurrentPipelineSection = new PsCheckFunds (); break;
case 2:
$ this-> mCurrentPipelineSection = new PsCheckStock (); break;
Fall 3:
$ this-> mCurrentPipelineSection = new PsStockOk (); break;
case 4:
$ this-> mCurrentPipelineSection = new PsTakePayment (); break;
Fall 5:
$ this-> mCurrentPipelineSection = new PsShipGoods (); break;
Fall 6:
$ this-> mCurrentPipelineSection = new PsShipOK (); break;
Fall 7:
$ this-> mCurrentPipelineSection = new PsFinalNotification (); break;
Fall 8:
throw new Exception ( "har du beställa redan avslutats."); break;
Standard:
throw new Exception ( "Unknown rörledningsavsnittet in.");
)
)
/ / Skickar e-post
public function Mail ($ params, $ till, $ headers, $ message)
(
/ / Skapa e-objektet med Mail:: factory metod
$ mail_object = Mail:: factory ( 'SMTP', $ params);
/ / Testa post objektet är giltigt
if (PEAR:: ÄRFEL ($ mail_object))
throw new Exception ($ mail_object-> getMessage ());
/ / Skickar e-post
$ result = $ mail_object-> Send ($ till, $ headers, $ message);
/ / Testa om post har skickats
if (PEAR:: ÄRFEL ($ result))
throw new Exception ( "Kunde inte skicka e-post till $ till.".
$ result-> getMessage ());
)
/ / Bygger e-postmeddelande
public function MailAdmin (föremål $, $ message)
(
/ / Brukar du är inte tillåtet att sätta "Från" header
$ headers [ 'from'] = $ this-> mConfiguration-> mOrderProcessorEmail;
$ headers [ 'subject'] = $ subject;
$ headers [ 'to'] = $ this-> mConfiguration-> mAdminEmail;
$ this-> Mail ($ this-> mConfiguration-> mOrderProcessorEmailParams,
$ this-> mConfiguration-> mAdminEmail,
$ headers,
$ message);
)
/ / Får den kund som gjorde att
public function GetCurrentCustomer ()
(
if (empty ($ this-> mCurrentCustomer))
(
$ this-> mCurrentCustomer = new
Kund ($ this-> mOrderManager-> GetCustomerByOrderId ($ this-> mOrderId));
if (empty ($ this-> mCurrentCustomer))
throw new Exception ($ this-> mOrderId. "beslut inte har en
kund ");
)
return $ this-> mCurrentCustomer;
)
/ / Hämtar information om den rådande ordningen
public function GetCurrentOrderDetails ()
(
if (empty ($ this-> mCurrentOrderDetails))
(
$ this-> mCurrentOrderDetails = new
OrderDetails ($ this-> mOrderManager-> GetOrderDetails ($ this-> mOrderId));
if (empty ($ this-> mCurrentOrderDetails))
throw new Exception ($ this-> mOrderId.
"Har inte för detaljer entry");
)
return $ this-> mCurrentOrderDetails;
)
/ / Lägger revision meddelande
public function AddAudit ($ message, $ messageNumber)
(
$ this-> mOrderManager-> AddAudit ($ this-> mOrderId, $ message, $ messageNumber);
)
/ / Uppdateringar orderstatus
public function UpdateOrderStatus ($ newStatus)
(
$ this-> mOrderManager-> UpdateOrderStatus ($ this-> mOrderId, $ newStatus);
$ this-> mOrderStatus = $ newStatus;
)
/ / Set beställnings behörighetskoden och referens kod
public function SetOrderAuthCodeAndReference (newAuthCode $, $ newReference)
(
$ this-> mOrderManager-> SetOrderAuthCodeAndReference ($ this-> mOrderId,
$ newAuthCode,
$ newReference);
$ this-> mAuthCode = $ newAuthCode;
$ this-> mReference = $ newReference;
)

/ / Gets kod för auktorisation och referens nummer
privata tillställningar GetOrderAuthCodeAndReference ()
(
$ result = $ this-> mOrderManager-> GetOrderAuthCodeAndReference (
$ this-> mOrderId);
if (empty ($ result)) throw Exception ($ this-> mOrderId. "finns inte");
$ this-> mAuthCode = $ result [ 'auth_code'];
$ this-> mReference = $ result [ 'reference'];
)
/ / Gets kod för auktorisation
public function GetAuthCode ()
(
if (empty ($ this-> mAuthCode)) $ this-> GetOrderAuthCodeAndReference ();
return $ this-> mAuthCode;
)
/ / Gets kod orderreferens
public function GetReference ()
(
if (empty ($ this-> mReference)) $ this-> GetOrderAuthCodeAndReference ();
return $ this-> mReference;
)
/ / Set beställnings leveransdatum
public function SetDateShipped ()
(
$ this-> mOrderManager-> SetDateShipped ($ this-> mOrderId);
)
)

?>
[/ php]

Snälla, hjälp någon kommer det att bli mycket uppskattad. kommer slags galen.

Tack så mycket
  #2  
Old 31 mars 2008, 17:31
Givargruppen
 
Default Päron post

Har detta får lösas?

http://www.geeklog.net/forum/viewtop...howtopic=75900 diskuterar det. Jag har inte använt någon Päron moduler under Windows så försöker det är din bästa vägen framåt.
__________________

Mitt System: Tim

Processor (s):
Athlon 64 3500 +
Moderkort:
Asus A8N-VM CSM
RAM Minne:
Corsair PC3200 CL2 DDR-400 2GB
Grafikkort (s):
nVidia Geforce 6600 512 MB
Ljudkort:
Cherry RS 6000 M tangentbord
Hårddisk (s):
Barracuda.7 + 2x200GB 58MB / s upprätthålla
Optisk enhet (er):
Samsung DVD-ROM TS-H352
Mål / PSU:
Thermaltake Soprano
Kylning:
Lager
Nätverk / Internet:
Telewest 2x20Mb/sec
Monitor (s):
SXGA platta
Operating System (s):
Slackware (2.6.27.7) (Fluxbox)
Reply

Register

Komihåglista

Liknande Trådar
Tråd Thread Starter Forum Svar Senaste Inlägg
Ubuntu med post evilfantasy Linux & Alternativa OS 7 30 januari 2009 14:37
E-post med virus bilsat Virus, spionprogram och säkerhet 2 29 oktober 2008 09:58
Windows Mail dfr200764 E-post, VoIP & IM Diskussion 4 20 august 2008 14:42
Mail i rabatterna Gazmondo General Hardware Chat 6 26 februari 2008 17:01
Mail problem " liamfi E-post, VoIP & IM Diskussion 3 1 januari 2008 09:44
Thread Tools




Arabic Bulgarian Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Finnish French German Greek Hebrew Hungarian Italian Japanese Korean Latvian Lithuanian Norwegian Polish Portuguese Romanian Russian Serbian Slovak Spanish Swedish Thai Turkish Ukrainian

Copyright © 2006 - 2009 Computer Juice.

Powered by vBulletin ® Copyright © 2000 - 2009 Jelsoft Enterprises Ltd SEO av vBSEO © 2009, sökningen, Inc.