![]() |
|
#1
| |||
| |||
| Merhaba tüm Sohbet Armut mail.php bir sorun yaşıyorsanız Sohbet elde Bu hata mesajı Ölümcül hata: Sınıf 'Posta' bulunamadı \ Armut \ mail.php satırda 26 burada kodu [php] <? PHP / / Referans Posta PEAR kütüphanesi require_once 'Mail.php'; / / Ana sınıf, sipariş bilgi almak için kullanılan, / / Boru hattı kesitler, denetim emirleri, vb koşmak sınıf OrderProcessor ( $ mOrderId kamu; kamu $ mOrderStatus; kamu $ mConnection; kamu $ mConfiguration; kamu $ mContinueNow; private $ mCurrentCustomer; private $ mCurrentOrderDetails; private $ mOrderManager; private $ mReference; private $ mAuthCode; / / Constructor DoOrderManager örneğini oluşturur fonksiyonu __construct () ( $ this-> mOrderManager = yeni DoOrderManager (); ) / / Proses checkout.php ve orders_admin.php bir işleme denir / / Sipariş; ilk parametre düzenin numaranız ve ikinci / / Parametre OrderProcessorConfiguration bir örnektir. public function Süreci ($ newOrderId, $ newConfiguration) ( / / Sipariş kimliği koymak $ this-> = $ newOrderId mOrderId; / / Configure işlemci $ this-> mConfiguration = $ newConfiguration; $ this-> mContinueNow = true; / / Yürütme oturum başlatmak $ this-> AddAudit ( "Sipariş İşlemci başladı.", 10000); / / Sipariş durumu elde $ this-> mOrderStatus = $ this-> mOrderManager-> GetOrderStatus ($ this-> mOrderId); / / Süreç boru hattı bölümü denemek ( ($ this-> mContinueNow) iken ( $ this-> mContinueNow = false; $ cps = $ this-> GetCurrentPipelineSection (); $ cps-> Süreci ($ this); ) ) (Exception $ e) yakalamak ( trigger_error ( 'Exception "'. $ e-> getMessage (). '"' gör. $ e-> getFile (). "Line". $ e-> getLine ()); $ this-> MailAdmin ( "Sipariş İşleme hata ocured.", $ e-> getMessage ()); $ this-> AddAudit ( "Sipariş İşleme hata ocured.", 10002); ( "işlemci hatası") yeni İstisna atmak; ) $ this-> AddAudit ( "Sipariş İşlemci bitirdi.", 10001); ) / / Bir nesne örneği mevcut boru hattı bölümü temsil eden alır GetCurrentPipelineSection private function () ( switch ($ this-> mOrderStatus) ( case 0: $ this-> mCurrentPipelineSection = yeni PsInitialNotification (); break; case 1: $ this-> mCurrentPipelineSection = yeni PsCheckFunds (); break; case 2: $ this-> mCurrentPipelineSection = yeni PsCheckStock (); break; case 3: $ this-> mCurrentPipelineSection = yeni PsStockOk (); break; case 4: $ this-> mCurrentPipelineSection = yeni PsTakePayment (); break; case 5: $ this-> mCurrentPipelineSection = yeni PsShipGoods (); break; case 6: $ this-> mCurrentPipelineSection = yeni PsShipOK (); break; case 7: $ this-> mCurrentPipelineSection = yeni PsFinalNotification (); break; case 8: throw new Exception ( "Sipariş zaten tamamlanmıştır."); break; default: throw new Exception ( "Bilinmeyen boru hattı bölümüne istedi."); ) ) / / E-posta gönderir public function Posta ($ params, $ için, $ headers, $ message) ( / / Posta oluştur Mail kullanarak nesne:: Fabrika yöntemi $ mail_object = Mail:: factory ( 'smtp', $ params); / / Test posta nesne geçerlidir if (PEAR:: EHATALIYSA ($ mail_object)) Yeni Exception ($ mail_object-> getMessage atma ()); / / E-posta gönderir $ result = $ mail_object-> send ($, $ headers, $ mesaj) için; / / Test if posta başarıyla gönderildi (PEAR:: EHATALIYSA ($ result)) eğer throw new Exception ( "e-posta $ için gönderilemedi.". $ result-> getMessage ()); ) / / E-posta iletisi oluşturur public function MailAdmin ($ konu, $ mesaj) ( / / Genellikle 'Kimden' başlığını ayarlamak için izin verilmez $ headers [ 'From'] = $ this-> mConfiguration-> mOrderProcessorEmail; $ headers [ 'Konu'] = $ konu; $ headers [ 'To'] = $ this-> mConfiguration-> mAdminEmail; $ this-> mail ($ this-> mConfiguration-> mOrderProcessorEmailParams, $ this-> mConfiguration-> mAdminEmail, $ headers, $ mesaj); ) / / Bu sırada yapılan müşteri alır GetCurrentCustomer public function () ( if (($ this-boş> mCurrentCustomer)) ( $ this-> mCurrentCustomer = new Müşteri ($ this-> mOrderManager-> GetCustomerByOrderId ($ this-> mOrderId)); if (($ this-boş> mCurrentCustomer)) Yeni Exception ($ this-> mOrderId atın. "amacıyla bir yok müşteri "); ) mCurrentCustomer $ this-> return; ) / / Mevcut düzenin bilgi alır GetCurrentOrderDetails public function () ( if (($ this-> mCurrentOrderDetails)) boş ( $ this-> mCurrentOrderDetails = new OrderDetails ($ this-> mOrderManager-> GetOrderDetails ($ this-> mOrderId)); if (($ this-> mCurrentOrderDetails)) boş Yeni Exception ($ this-> mOrderId atın. "") Sipariş bilgi girişi yok; ) $ this-> return mCurrentOrderDetails; ) / / Denetim mesajı ekler public function AddAudit ($ mesaj, $ messageNumber) ( $ this-> mOrderManager-> AddAudit ($ this-> mOrderId, $ mesaj, $ messageNumber); ) / / Güncellemeleri sipariş durumu public function UpdateOrderStatus ($ newStatus) ( $ this-> mOrderManager-> UpdateOrderStatus ($ this-> mOrderId, $ newStatus); $ this-> mOrderStatus = $ newStatus; ) / / Sipariş yetkisine kodu ve referans kodu belirleyebilirsiniz public function SetOrderAuthCodeAndReference ($ newAuthCode, $ newReference) ( $ this-> mOrderManager-> SetOrderAuthCodeAndReference ($ this-> mOrderId $ newAuthCode, $ newReference); $ this-> mAuthCode = $ newAuthCode; $ this-> mReference = $ newReference; ) / / Sipariş yetkilendirme kodu ve referans kodu alır GetOrderAuthCodeAndReference private function () ( $ result = $ this-> mOrderManager-> GetOrderAuthCodeAndReference ( $ this-> mOrderId); (empty ($ result)) mevcut değil ") Exception ($ this-> mOrderId." atmak; $ this-> mAuthCode = $ result [ 'auth_code']; $ this-> mReference = $ result [ 'referans']; ) / / Sipariş yetkilendirme kod gets GetAuthCode public function () ( if (($ this-> mAuthCode)) $ this-> GetOrderAuthCodeAndReference boş (); mAuthCode $ this-> return; ) / / Sipariş referans kodu alır GetReference public function () ( if (($ this-boş> mReference)) $ this-> GetOrderAuthCodeAndReference (); mReference $ this-> return; ) / / Sipariş gemi tarih SetDateShipped public function () ( $ this-> mOrderManager-> SetDateShipped ($ this-> mOrderId); ) ) ?> [/ php] Lütfen çok takdir edilecektir birisi yardımcı olur. MAD devam ediyor. Çok teşekkürler |
|
#2
| ||||||||||||
| ||||||||||||
| Mi bu çözüldü mı?
__________________
http://www.geeklog.net/forum/viewtop...howtopic=75900 bunu anlatıyor. Windows altında bu nedenle en iyi yol olduğunu çalışırken herhangi Armut modülleri kullanılmaz ettik. Benim Sistemi: Tim
|