![]() |
|
#1
| |||
| |||
| Hello all im o problem z Pear Mail.php im wyświetlany jest komunikat Błąd krytycznyKlasa "Mail" nie znaleziono w \ PEAR \ Mail.php on-line 26 tutaj jest mój kod [php] <? php / / Odniesienie do biblioteki PEAR Mail require_once 'Mail.php'; / / Main klasy, używane w celu uzyskania informacji o zamówieniu, / / Uruchom części rurociągu, zlecenia audytu, itd. Klasa OrderProcessor ( public $ mOrderId; public $ mOrderStatus; public $ mConnection; public $ mConfiguration; public $ mContinueNow; private $ mCurrentCustomer; private $ mCurrentOrderDetails; private $ mOrderManager; private $ mReference; private $ mAuthCode; / / Konstruktor tworzy przykład DoOrderManager function __construct () ( $ this-> mOrderManager = new DoOrderManager (); ) / / Proces ten nazywany jest od checkout.php i orders_admin.php do procesu / / Kolejność: pierwszy parametr identyfikator zamówienia, a drugi / / Parametr jest przykład OrderProcessorConfiguration. Proces funkcji publicznych ($ newOrderId $ newConfiguration) ( / / Ustaw identyfikator zamówienia $ this-> mOrderId = $ newOrderId; / / Procesor skonfigurować $ this-> mConfiguration = $ newConfiguration; $ this-> mContinueNow = true; / / Start dziennika wykonania $ this-> AddAudit ( "Order Processor started.", 10000); / / Uzyskanie statusu zamówienia $ this-> mOrderStatus = $ this-> mOrderManager-> GetOrderStatus ($ this-> mOrderId); / / Punkt rurociągu procesu próbować ( while ($ this-> mContinueNow) ( $ this-> mContinueNow = false; $ cps = $ this-> GetCurrentPipelineSection (); $ CPS-> process ($ this); ) ) catch (Exception $ e) ( trigger_error ( "wyjątek". $ e-> getMessage (). "o". $ e-> getFile (). "Linii". $ e-> getline ()); $ this-> MailAdmin ( "Order Błąd przetwarzania ocured." $ e-> getMessage ()); $ this-> AddAudit ( "Order Błąd przetwarzania ocured.", 10002); throw new Exception ( "Błąd procesora"); ) $ this-> AddAudit ( "Order Processor gotowy.", 10001); ) / / Gets przykład obiekt reprezentujący bieżącego odcinka rurociągu prywatnych GetCurrentPipelineSection function () ( 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 ( "Zamówienie zostało już zakończone.") break; domyślnie: throw new Exception ( "Nieznany sekcji rurociągu wniosek."); ) ) / / Wysyła e-mail funkcję publiczną mail ($ params, $ to, $ headers, $ message) ( / / Utworzenie obiektu przy użyciu poczty Mail:: Metoda fabryki $ mail_object = Mail:: factory ( 'smtp', $ params); / / Test obiektu mail jest prawidłowy if (PEAR:: isError ($ mail_object)) throw new Exception ($ mail_object-> getMessage ()); / / Wysyła e-mail $ result = $ mail_object-> send ($ to, $ headers, $ message); / / Należy sprawdzić, czy e-mail został wysłany pomyślnie if (PEAR:: isError ($ result)) throw new Exception ( "Nie można wysłać e-mail do $.. $ result-> getMessage ()); ) / / Tworzy wiadomość e-mail funkcję publiczną MailAdmin ($ subject, $ message) ( / / Zwykle nie możesz ustawić "Od" nagłówek $ headers [ 'From'] = $ this-> mConfiguration-> mOrderProcessorEmail; $ headers [ 'Subject'] = $ temat; $ headers [ 'To'] = $ this-> mConfiguration-> mAdminEmail; $ this-> mail ($ this-> mConfiguration-> mOrderProcessorEmailParams, $ this-> mConfiguration-> mAdminEmail, $ headers, $ message); ) / Dostaje klient, który wydał postanowienie publicznych GetCurrentCustomer function () ( if (empty ($ this-> mCurrentCustomer)) ( $ this-> mCurrentCustomer = new Klient ($ this-> mOrderManager-> GetCustomerByOrderId ($ this-> mOrderId)); if (empty ($ this-> mCurrentCustomer)) throw new Exception ($ this-> mOrderId. "aby nie klientów "); ) return $ this-> mCurrentCustomer; ) / / Pobiera dane z obecnego porządku publicznych GetCurrentOrderDetails function () ( if (empty ($ this-> mCurrentOrderDetails)) ( $ this-> mCurrentOrderDetails = new SzczegółyZam ($ this-> mOrderManager-> GetOrderDetails ($ this-> mOrderId)); if (empty ($ this-> mCurrentOrderDetails)) throw new Exception ($ this-> mOrderId. "Nie ma celu Szczegóły wpis"); ) return $ this-> mCurrentOrderDetails; ) / / Dodaje komunikat audytu funkcję publiczną AddAudit ($ message, $ messageNumber) ( $ this-> mOrderManager-> AddAudit ($ this-> mOrderId, $ message, $ messageNumber); ) / / Status zamówienia aktualizacje publicznych UpdateOrderStatus function ($ newStatus) ( $ this-> mOrderManager-> UpdateOrderStatus ($ this-> mOrderId $ newStatus); $ this-> mOrderStatus = $ newStatus; ) / / Set zamówienia kod autoryzacji i odniesienie do kodu funkcję publiczną SetOrderAuthCodeAndReference ($ newAuthCode $ newReference) ( $ this-> mOrderManager-> SetOrderAuthCodeAndReference ($ this-> mOrderId, $ newAuthCode, $ newReference); $ this-> mAuthCode = $ newAuthCode; $ this-> mReference = $ newReference; ) / / Pobiera kod autoryzacji celu i odniesienie do kodu Private Function GetOrderAuthCodeAndReference () ( $ result = $ this-> mOrderManager-> GetOrderAuthCodeAndReference ( $ this-> mOrderId); if (empty ($ result)) throw Exception ($ this-> mOrderId. "nie istnieje"); $ this-> mAuthCode = $ wynik [ 'auth_code']; $ this-> mReference = $ wynik [ 'reference']; ) / / Pobiera kod autoryzacji aby funkcję publiczną GetAuthCode () ( if (empty ($ this-> mAuthCode)) $ this-> GetOrderAuthCodeAndReference (); return $ this-> mAuthCode; ) / / Pobiera kod referencyjny celu funkcję publiczną GetReference () ( if (empty ($ this-> mReference)) $ this-> GetOrderAuthCodeAndReference (); return $ this-> mReference; ) / / Set zamówienia daty wysyłki funkcję publiczną SetDateShipped () ( $ this-> mOrderManager-> SetDateShipped ($ this-> mOrderId); ) ) ?> [/ php] Proszę pomóc ktoś będzie much appreciated. going rodzaju szalony. Dziękuję bardzo |
|
#2
| ||||||||||||
| ||||||||||||
| Czy ten rozwiązano dostać?
__________________
http://www.geeklog.net/forum/viewtop...howtopic=75900 omawia je. I've nie korzystał z żadnych Pear moduły pod Windows próbuje tak jest Twoim najlepszym rozwiązaniem. My System: Tim
|
![]() |
|
| Zakładki |
Podobne wątki | ||||
| Wątek | Thread Starter | Forum | Odpowiedzi | Ostatni Post |
| Ubuntu pocztą | evilfantasy | Linux & Alternative OS | 7 | 30 styczeń 2009 14:37 |
| E-mail z wirusem | bilsat | Wirusów, oprogramowania szpiegującego i Bezpieczeństwa | 2 | 29 październik 2008 09:58 |
| Windows Mail | dfr200764 | E-mail, VoIP & IM dyskusja | 4 | 20 sierpień 2008 14:42 |
| Poczta w rabaty | Gazmondo | Ogólne Hardware Czat | 6 | 26 luty 2008 17:01 |
| Poczta prob " | liamfi | E-mail, VoIP & IM dyskusja | 3 | 1. styczeń 2008 09:44 |
| Narzędzia wątku | |
| |