![]() |
|
#1
|
|||
|
|||
|
Hallo allemaal im met een probleem met Pear mail.php
im krijg dit foutbericht Fatale fout: Klasse 'Mail' niet gevonden in \ PEAR \ mail.php on-line 26 hier is mijn code [php] <? php / / Verwijzing van de Mail PEAR bibliotheek require_once 'Mail.php'; / / Main klasse, gebruikt om informatie te verkrijgen, / / Run pijpleiding secties, audit bestellingen, enz. klasse OrderProcessor ( public $ mOrderId; public $ mOrderStatus; public $ mConnection; public $ mConfiguration; public $ mContinueNow; private $ mCurrentCustomer; private $ mCurrentOrderDetails; private $ mOrderManager; private $ mReference; private $ mAuthCode; / / Bouwer maakt DoOrderManager bijvoorbeeld function __construct () ( $ this-> mOrderManager = new DoOrderManager (); ) / / Process heet vanaf checkout.php en orders_admin.php tot een proces / / Bestellen, de eerste parameter is de ID van de bestelling, en de tweede / / Parameter is een OrderProcessorConfiguration aanleg. publieke functie Process ($ newOrderId, $ newConfiguration) ( / / Set order ID $ this-> mOrderId = $ newOrderId; / / Configure-processor $ this-> mConfiguration = $ newConfiguration; $ this-> mContinueNow = true; / / Log start van de uitvoering $ this-> AddAudit ( "Order Processor gestart.", 10000); / / Verkrijgen van de status van orde $ this-> mOrderStatus = $ this-> mOrderManager-> GetOrderStatus ($ this-> mOrderId); / / Proces leidingdeel proberen ( while ($ this-> mContinueNow) ( $ this-> mContinueNow = false; $ cps = $ this-> GetCurrentPipelineSection (); $ CPS-> Process ($ this); ) ) catch (Exception $ e) ( trigger_error ( "Exception" '. $ e-> getMessage (). "over". $ e-> GetFile (). "Lijn". $ e-> getline ()); $ this-> MailAdmin ( "Order Processing fout ocured.", $ e-> getMessage ()); $ this-> AddAudit ( "Order Processing fout ocured.", 10002); throw new Exception ( "verwerker fout"); ) $ this-> AddAudit ( "Order Processor klaar.", 10001); ) / / Krijgt een object instantie die de huidige leidingdeel private function GetCurrentPipelineSection () ( switch ($ this-> mOrderStatus) ( case 0: $ this-> mCurrentPipelineSection = new PsInitialNotification (); break; case 1: $ this-> mCurrentPipelineSection = new PsCheckFunds (); break; case 2: $ this-> mCurrentPipelineSection = new PsCheckStock (); break; case 3: $ this-> mCurrentPipelineSection = new PsStockOk (); break; case 4: $ this-> mCurrentPipelineSection = new PsTakePayment (); break; case 5: $ this-> mCurrentPipelineSection = new PsShipGoods (); break; case 6: $ this-> mCurrentPipelineSection = new PsShipOK (); break; case 7: $ this-> mCurrentPipelineSection = new PsFinalNotification (); break; case 8: throw new Exception ( "Order reeds is afgerond."); break; standaard: throw new Exception ( "Onbekend leidingdeel gevraagd."); ) ) / / E-mail stuurt publieke functie mail ($ params, $ to, $ headers, $ bericht) ( / / Maak object met behulp van de e-mail de Mail:: factory methode mail_object = $ Mail:: factory ( 'smtp', $ params); / / Test de mail object is geldig if (PEAR:: isError ($ mail_object)) throw new Exception ($ mail_object-> getMessage ()); / / E-mail stuurt $ result = $ mail_object-> send ($ to, $ headers, $ bericht); / / Test of mail succesvol is verzonden if (PEAR:: isError ($ result)) throw new Exception ( "Kan geen e-mail naar $ te sturen.". $ result-> getMessage ()); ) / / Bouwt e-mailbericht publieke functie MailAdmin ($ subject, $ bericht) ( / / U meestal niet toegestaan om de 'From' header $ headers [ 'From'] = $ this-> mConfiguration-> mOrderProcessorEmail; $ headers [ 'Subject'] = $ onderwerp; $ headers [ 'to'] = $ this-> mConfiguration-> mAdminEmail; $ this-> Mail ($ this-> mConfiguration-> mOrderProcessorEmailParams, $ this-> mConfiguration-> mAdminEmail, $ headers, $ bericht); ) / / Krijgt de klant dat de bestelling gemaakt publieke functie GetCurrentCustomer () ( if (empty ($ this-> mCurrentCustomer)) ( $ this-> mCurrentCustomer = new Klant ($ this-> mOrderManager-> GetCustomerByOrderId ($ this-> mOrderId)); if (empty ($ this-> mCurrentCustomer)) throw new Exception ($ this-> mOrderId. "om niet over een klant "); ) return $ this-> mCurrentCustomer; ) / / Krijgt de details van de huidige orde publieke functie GetCurrentOrderDetails () ( if (empty ($ this-> mCurrentOrderDetails)) ( $ this-> mCurrentOrderDetails = new OrderDetails ($ this-> mOrderManager-> GetOrderDetails ($ this-> mOrderId)); if (empty ($ this-> mCurrentOrderDetails)) throw new Exception ($ this-> mOrderId. "Heeft nog geen ordergegevens entry"); ) return $ this-> mCurrentOrderDetails; ) / / Voegt audit bericht publieke functie AddAudit ($ message, $ messageNumber) ( $ this-> mOrderManager-> AddAudit ($ this-> mOrderId, $ message, $ messageNumber); ) / / Updates orderstatus publieke functie UpdateOrderStatus ($ NewStatus) ( $ this-> mOrderManager-> UpdateOrderStatus ($ this-> mOrderId, $ NewStatus); $ this-> mOrderStatus = $ NewStatus; ) / / Set toestemming om de code en de referentie-code publieke functie SetOrderAuthCodeAndReference ($ newAuthCode, $ newReference) ( $ this-> mOrderManager-> SetOrderAuthCodeAndReference ($ this-> mOrderId, $ newAuthCode, $ newReference); $ this-> mAuthCode = $ newAuthCode; $ this-> mReference = $ newReference; ) / / Krijgt om vergunning code en de referentie-code private function GetOrderAuthCodeAndReference () ( $ result = $ this-> mOrderManager-> GetOrderAuthCodeAndReference ( $ this-> mOrderId); if (empty ($ result)) throw Exception ($ this-> mOrderId. "bestaat niet"); $ this-> mAuthCode = $ resultaat [ 'auth_code']; $ this-> mReference = $ resultaat [ 'referentie']; ) / / Krijgt om vergunning code publieke functie GetAuthCode () ( if (empty ($ this-> mAuthCode)) $ this-> GetOrderAuthCodeAndReference (); return $ this-> mAuthCode; ) / / Krijgt order referentie-code publieke functie GetReference () ( if (empty ($ this-> mReference)) $ this-> GetOrderAuthCodeAndReference (); return $ this-> mReference; ) / / Set schip om de datum publieke functie SetDateShipped () ( $ this-> mOrderManager-> SetDateShipped ($ this-> mOrderId); ) ) ?> [/ php] Please help iemand wordt zeer gewaardeerd. ga soort boos. Hartelijk dank |
|
#2
|
||||||||||||
|
||||||||||||
|
Heeft dit opgelost krijgen?
__________________
http://www.geeklog.net/forum/viewtop...howtopic=75900 bespreekt het. Ik heb niet gebruikt Pear modules onder Windows dus probeer het is uw beste weg is. Mijn Systeem: Tim
|