![]() |
| |||||||
| Registrovat | Site Spy | Seznam členů | Darování | Hledat | Dnešní příspěvky | Označit témata jako přečtená | Pravidla fóra |
|
![]() |
| | Thread Nástroje |
|
#1
| |||
| |||
| Zdravím všechny im mají problém s Hruška mail.php im získání této chybě Fatal error: Class' Mail 'nebyl nalezen v \ PEAR \ mail.php on-line 26 tady je moje číslo [php] <? php / / Reference Mail PEAR knihovny require_once 'Mail.php'; / / Hlavní třída, který se používá k získání informací o objednávce, / / Spuštění ropovodu sekcí, audit objednávek, atd. třída OrderProcessor ( public $ mOrderId; public $ mOrderStatus; public $ mConnection; public $ mConfiguration; public $ mContinueNow; private $ mCurrentCustomer; private $ mCurrentOrderDetails; private $ mOrderManager; private $ mReference; private $ mAuthCode; / / Konstruktor vytvoří instanci DoOrderManager function __construct () ( $ this-> mOrderManager = new DoOrderManager (); ) / / Proces se nazývá od checkout.php a orders_admin.php zpracovat / / Pořadí, první parametr je identifikátor příkazu, a druhý / / Parametr je instance OrderProcessorConfiguration. public function Process ($ newOrderId, $ newConfiguration) ( / / Nastavit, aby ID $ this-> mOrderId = $ newOrderId; / / Nastavení procesoru $ this-> mConfiguration = $ newConfiguration; $ this-> mContinueNow = true; / / Log zahájení realizace $ this-> AddAudit ( "Objednávka Processor začalo.", 10000); / / Získání statusu objednávky $ this-> mOrderStatus = $ this-> mOrderManager-> GetOrderStatus ($ this-> mOrderId); / / Proces úseku potrubí zkusit ( 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íská instanci objektu představující současný úseku potrubí 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 byla již dokončena.") break; výchozí: throw new Exception ( "Neznámý úseku potrubí požádal."); ) ) / / Pošle e-mail public function email ($ params, $ to, $ headers, $ message) ( / / Vytvoření objektu pomocí mailu Mail:: tovární metodu $ = mail_object Mail:: továrna ( 'smtp', $ params); / / Test pošty objekt je platná if (PEAR:: JE.CHYBHODN ($ mail_object)) throw new Exception ($ mail_object-> getMessage ()); / / Pošle e-mail $ result = $ mail_object-> send ($ to, $ headers, $ message); / / Test, zda mail byl úspěšně odeslán if (PEAR:: JE.CHYBHODN ($ result)) throw new Exception ( "Nelze odeslat e-mail $ to.". $ result-> getMessage ()); ) / / Vytváří e-mailové zprávy public function mailadmin ($ subject, $ message) ( / / Obvykle nemůžete nastavit 'Z' záhlaví $ headers [ 'Z'] = $ this-> mConfiguration-> mOrderProcessorEmail; $ headers [ 'subject'] = $ subject; $ headers [ 'to'] = $ this-> mConfiguration-> mAdminEmail; $ this-> email ($ this-> mConfiguration-> mOrderProcessorEmailParams, $ this-> mConfiguration-> mAdminEmail, $ headers, $ message); ) / / Získá zákazník, který učinila 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íská informace o aktuální pořadí 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; ) / / Přidá auditorské zprávy public function AddAudit ($ message, $ messageNumber) ( $ this-> mOrderManager-> AddAudit ($ this-> mOrderId, $ message, $ messageNumber); ) / / Aktualizace stavu objednávek public function UpdateOrderStatus ($ newStatus) ( $ this-> mOrderManager-> UpdateOrderStatus ($ this-> mOrderId, $ newStatus); $ this-> mOrderStatus = $ newStatus; ) / / Nastavit, 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; ) / / Pořadí získá referenční kód public function GetReference () ( if (empty ($ this-> mReference)) $ this-> GetOrderAuthCodeAndReference (); return $ this-> mReference; ) / / Nastavit, aby loď datum public function SetDateShipped () ( $ this-> mOrderManager-> SetDateShipped ($ this-> mOrderId); ) ) ?> [/ php] Prosím pomozte někdo bude velmi oceňovány. probíhající druhu šílený. Díky moc |
|
#2
| ||||||||||||
| ||||||||||||
| Se to dostat vyřešit?
__________________
http://www.geeklog.net/forum/viewtop...howtopic=75900 Diskutuje se. I've nepoužívají žádné Hruška modulech pod Windows tak zkouším je váš nejlepší cestu vpřed. Můj systém: Tim
|
![]() |
|
| Záložky |
Podobná témata | ||||
| Nitka | Thread Začátečnickou | Fórum | Odpovědi | Poslední příspěvek |
| Ubuntu mailem | evilfantasy | Linux & Alternativní OS | 7 | 30. ledna 2009 14:37 |
| E-mail s virem | bilsat | Virus, spyware a bezpečnost | 2 | 29. říjen 2008 09:58 |
| Windows Mail | dfr200764 | Email, VoIP & IM Diskuse | 4 | 20. Srpen 2008 14:42 |
| Mail na slevy | Gazmondo | Obecné Hardware Chat | 6 | 26. února 2008 17:01 |
| Mail pravděpo ' | liamfi | Email, VoIP & IM Diskuse | 3 | 1. ledna 2008 09:44 |
| Thread Nástroje | |
| |