![]() |
| |||||||
| Registrovať | Site Spy | Zoznam členov | Darovanie | Hľadať | Dnešné príspevky | Označiť témy ako prečítané | Pravidlá fóra |
|
![]() |
| | Thread Tools |
|
#1
| |||
| |||
| Zdravím všetky im majú problém s Hruška mail.php im získanie tejto chybe Fatal error: Class' Mail 'nebol nájdený v \ PEAR \ mail.php on-line 26 tady je moje číslo [php] <? Php / / Referencia Mail PEAR knižnice require_once 'Mail.php'; / / Hlavná trieda, ktorý sa používa na získanie informácií o objednávke, / / Spustenie ropovodu sekcií, audit objednávok, atď trieda OrderProcessor ( public $ mOrderId; public $ mOrderStatus; public $ mConnection; public $ mConfiguration; public $ mContinueNow; private $ mCurrentCustomer; private $ mCurrentOrderDetails; private $ mOrderManager; private $ mReference; private $ mAuthCode; / / Konštruktor vytvorí inštanciu DoOrderManager function __construct () ( $ This-> mOrderManager = new DoOrderManager (); ) / / Proces sa nazýva od checkout.php a orders_admin.php spracovať / / Poradie, prvý parameter je identifikátor príkazu, a druhý / / Parameter je inštancie OrderProcessorConfiguration. public function Process ($ newOrderId, $ newConfiguration) ( / / Nastaviť, aby ID $ This-> mOrderId = $ newOrderId; / / Nastavenie procesora $ This-> mConfiguration = $ newConfiguration; $ This-> mContinueNow = true; / / Log začatia realizácie $ This-> AddAudit ( "Objednávka Processor začalo.", 10000); / / Získanie štatútu objednávky $ This-> mOrderStatus = $ this-> mOrderManager-> GetOrderStatus ($ this-> mOrderId); / / Proces úseku potrubia skúsiť ( while ($ this-> mContinueNow) ( $ This-> mContinueNow = false; cps $ = $ this-> GetCurrentPipelineSection (); $ Tbl-> Process ($ this); ) ) catch (Exception $ e) ( trigger_error ( 'Exception' ". $ e-> getMessage (). '" o'. $ E-> getFile (). "Line". $ E-> getline ()); $ This-> MailAdmin ( "Order Processing chyba ocured.", $ E-> getMessage ()); $ This-> AddAudit ( "Order Processing chyba ocured.", 10002); throw new Exception ( "processor error"); ) $ This-> AddAudit ( "Objednávka Processor skončil.", 10001); ) / / Získa inštanciu objektu predstavujúce súčasný úseku potrubia 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 ( "Objednávka bola už dokončená.") break; predvolené: throw new Exception ( "Neznámy úseku potrubia požiadal."); ) ) / / Pošle e-mail public function email ($ params, $ to, $ headers, $ message) ( / / Vytvorenie objektu pomocou mailu Mail:: továrenské metódu $ = Mail_object Mail:: továreň ( 'smtp', $ params); / / Test pošty objekt je platná if (PEAR:: ISERROR ($ mail_object)) throw new Exception ($ mail_object-> getMessage ()); / / Pošle e-mail $ Result = $ mail_object-> send ($ to, $ headers, $ message); / / Test, či mail bol úspešne odoslaný if (PEAR:: ISERROR ($ result)) throw new Exception ( "Nemožno odoslať e-mail $ to.". $ Result-> getMessage ()); ) / / Vytvára e-mailovej správy public function MailAdmin ($ subject, $ message) ( / / Obvykle nemôžete nastaviť 'Z' hlavičky $ Headers [ 'Z'] = $ this-> mConfiguration-> mOrderProcessorEmail; $ Headers [ 'subject'] = $ subject; $ Headers [ 'to'] = $ this-> mConfiguration-> mAdminEmail; $ This-> email ($ this-> mConfiguration-> mOrderProcessorEmailParams, $ This-> mConfiguration-> mAdminEmail, $ Headers, $ Message); ) / / Získa zákazník, ktorý urobila objednávku public function GetCurrentCustomer () ( if (empty ($ this-> mCurrentCustomer)) ( $ This-> mCurrentCustomer = new Zákazník ($ this-> mOrderManager-> GetCustomerByOrderId ($ this-> mOrderId)); if (empty ($ this-> mCurrentCustomer)) throw new Exception ($ this-> mOrderId. "Aby nemá customer "); ) return $ this-> mCurrentCustomer; ) / / Získa informácie o aktuálnej poradí 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. "Nemá objednávku entry"); ) return $ this-> mCurrentOrderDetails; ) / / Pridajte audítorskej správy public function AddAudit ($ message, $ messageNumber) ( $ This-> mOrderManager-> AddAudit ($ this-> mOrderId, $ message, $ messageNumber); ) / / Aktualizácia stavu objednávok public function UpdateOrderStatus ($ newStatus) ( $ This-> mOrderManager-> UpdateOrderStatus ($ this-> mOrderId, $ newStatus); $ This-> mOrderStatus = $ newStatus; ) / / Nastaviť, aby to autorizačný kód a referenčný kód public function SetOrderAuthCodeAndReference ($ newAuthCode, $ newReference) ( $ This-> mOrderManager-> SetOrderAuthCodeAndReference ($ this-> mOrderId, $ NewAuthCode, $ NewReference); $ This-> mAuthCode = $ newAuthCode; $ This-> mReference = $ newReference; ) / / Dostane, aby autorizačný kód a referenčný kód private function GetOrderAuthCodeAndReference () ( $ Result = $ this-> mOrderManager-> GetOrderAuthCodeAndReference ( $ This-> mOrderId); if (empty ($ result)) throw Exception ($ this-> mOrderId. "neexistuje"); $ This-> mAuthCode = $ result [ 'auth_code']; $ This-> mReference = $ result [ 'reference']; ) / / Dostane, aby autorizačný kód public function GetAuthCode () ( if (empty ($ this-> mAuthCode)) $ this-> GetOrderAuthCodeAndReference (); return $ this-> mAuthCode; ) / / Poradie získa referenčný kód public function GetReference () ( if (empty ($ this-> mReference)) $ this-> GetOrderAuthCodeAndReference (); return $ this-> mReference; ) / / Nastaviť, aby loď dátum public function SetDateShipped () ( $ This-> mOrderManager-> SetDateShipped ($ this-> mOrderId); ) ) ?> [/ Php] Prosím pomôžte niekto bude veľmi oceňované. prebiehajúce druhu šialený. Díky moc |
|
#2
| ||||||||||||
| ||||||||||||
| Sa to dostat vyriešiť?
__________________
http://www.geeklog.net/forum/viewtop...howtopic=75900 Diskutuje sa. I've nepoužívajú žiadne Hruška moduloch pod Windows tak zkouším je váš najlepšiu cestu vpred. Môj systém: Tim
|