![]() |
|
#1
| |||
| |||
| שלום לכל IM נתקל בבעיה עם אגס mail.php IM מקבל את הודעת השגיאה שגיאה חמורה: כיתה 'דואר' לא נמצא \ אגס \ mail.php על הקו 26 הנה הקוד [PHP] <? PHP / / הפניה הספרייה דואר PEAR require_once 'Mail.php'; / / Class ראשי, השתמשו כדי להשיג מידע, / / להריץ קטעי צינור, הוראות ביקורת, וכו ' בכיתה OrderProcessor ( הציבור mOrderId $; הציבור mOrderStatus $; הציבור mConnection $; הציבור mConfiguration $; הציבור mContinueNow $; פרטי mCurrentCustomer $; פרטי mCurrentOrderDetails $; פרטי mOrderManager $; פרטי mReference $; פרטי mAuthCode $; / / בנאי יוצר מופע DoOrderManager פונקציה __construct () ( $ this-> mOrderManager = DoOrderManager חדש (); ) / / תהליך זה נקרא מ checkout.php ו orders_admin.php כדי תהליך / / הסדר; הפרמטר הראשון הוא מזהה של הסדר, ואת השנייה / / הפרמטר הוא מופע OrderProcessorConfiguration. תהליך תפקיד ציבורי (newConfiguration $ newOrderId, $) ( / / כדי להגדיר מזהה $ this-> mOrderId = $ newOrderId; / / לקבוע את תצורת המעבד newConfiguration $ this-> mConfiguration = $; $ this-> mContinueNow = true; / / להתחיל ביומן של ביצוע $ this-> AddAudit ( "צו מעבד התחיל.", 10000); / / על מנת לקבל מעמד של $ this-> mOrderStatus = $ this-> mOrderManager-> GetOrderStatus ($ this-> mOrderId); / / קטע צינור תהליך לנסות ( בעוד ($ this-> mContinueNow) ( $ this-> mContinueNow = false; CPS $ = $ this-> GetCurrentPipelineSection (); $-CPS> תהליך ($ הזה); ) ) catch (Exception $ e) ( trigger_error ( "חריגה". $ e-> getMessage (). ' "ב'. $ e-> getFile (). "קו". $ e-> getLine ()); $ this-> MailAdmin ( "צו שגיאת עיבוד ocured.", $ e-> getMessage ()); $ this-> AddAudit ( "צו שגיאת עיבוד ocured.", 10002); לזרוק Exception חדש ( "שגיאה מעבד"); ) $ this-> AddAudit ( "צו מעבד סיים.", 10001); ) / / מקבל מופע אובייקט המייצג את קטע הצינור הנוכחי GetCurrentPipelineSection פונקציה פרטית () ( הבורר ($ this-> mOrderStatus) ( מקרה 0: $ this-> mCurrentPipelineSection = PsInitialNotification חדש (); לשבור; מקרה 1: $ this-> mCurrentPipelineSection = PsCheckFunds חדש (); לשבור; מקרה 2: $ this-> mCurrentPipelineSection = PsCheckStock חדש (); לשבור; מקרה 3: $ this-> mCurrentPipelineSection = PsStockOk חדש (); לשבור; מקרה 4: $ this-> mCurrentPipelineSection = PsTakePayment חדש (); לשבור; מקרה 5: $ this-> mCurrentPipelineSection = PsShipGoods חדש (); לשבור; מקרה 6: $ this-> mCurrentPipelineSection = PsShipOK חדש (); לשבור; מקרה 7: $ this-> mCurrentPipelineSection = PsFinalNotification חדש (); לשבור; מקרה 8: לזרוק Exception חדש ( "צו כבר הושלמה."); לשבור; ברירת מחדל: לזרוק Exception חדש ( "קטע צינור ידוע המבוקש."); ) ) / / שולח הדוא"ל פונקציה דואר הציבור ($ params, $ ל, $ headers, $ הודעה) ( / / יצירת אובייקט באמצעות דואר אלקטרוני:: שיטת המפעל mail_object $ = Mail:: מפעל ( 'SMTP', $ params); / / בדוק את האובייקט מייל חוקית אם (PEAR:: ISERROR ($ mail_object)) לזרוק Exception חדש ($ mail_object-> getMessage ()); / / שולח הדוא"ל $ result = $ mail_object-> Send ($ to, $ headers, $ message); / / בדיקה אם הדואר נשלח בהצלחה אם (PEAR:: ISERROR ($ result)) לזרוק Exception חדש ( "לא ניתן לשלוח דואר אלקטרוני ל $.". התוצאה-$> getMessage ()); ) / / בונה את הודעת הדוא"ל פונקציה MailAdmin הציבור (הודעת $ הנושא, $) ( / / בדרך כלל אינך רשאי להגדיר את 'מאת' כותרת $ headers [ 'From'] = $ this-> mConfiguration-> mOrderProcessorEmail; $ headers [ 'נושא'] = $ הנושא; $ headers [ 'To'] = $ this-> mConfiguration-> mAdminEmail; $ this-> Mail ($ this-> mConfiguration-> mOrderProcessorEmailParams, $ this-> mConfiguration-> mAdminEmail, כותרות $, הודעת $); ) / / מקבל את הלקוח כי עשה את הסדר GetCurrentCustomer תפקיד ציבורי () ( if (empty ($ this-> mCurrentCustomer)) ( $ this-> mCurrentCustomer = חדש הלקוח ($ this-> mOrderManager-> GetCustomerByOrderId ($ this-> mOrderId)); if (empty ($ this-> mCurrentCustomer)) לזרוק Exception חדש ($ this-> mOrderId. "צו אין הלקוח "); ) return $ this-> mCurrentCustomer; ) / / מקבל את פרטי ההזמנה הנוכחית GetCurrentOrderDetails תפקיד ציבורי () ( if (empty ($ this-> mCurrentOrderDetails)) ( $ this-> mCurrentOrderDetails = חדש OrderDetails ($ this-> mOrderManager-> GetOrderDetails ($ this-> mOrderId)); if (empty ($ this-> mCurrentOrderDetails)) לזרוק Exception חדש ($ this-> mOrderId. "אין כניסה פרטי ההזמנה"); ) return $ this-> mCurrentOrderDetails; ) / / מוסיף הודעה הביקורת פונקציה AddAudit הציבור ($ message, $ messageNumber) ( $ this-> mOrderManager-> AddAudit ($ this-> mOrderId, $ message, $ messageNumber); ) / / עדכוני סטטוס ההזמנה UpdateOrderStatus תפקיד ציבורי ($ newStatus) ( $ this-> mOrderManager-> UpdateOrderStatus ($ this-> mOrderId, newStatus $); $ this-> mOrderStatus = $ newStatus; ) / / להגדיר קוד אישור הצו והפניה קוד פונקציה SetOrderAuthCodeAndReference הציבור (newReference $ newAuthCode, $) ( $ this-> mOrderManager-> SetOrderAuthCodeAndReference ($ this-> mOrderId, $ newAuthCode, newReference $); newAuthCode $ this-> mAuthCode = $; newReference $ this-> mReference = $; ) / / מקבל קוד אישור הסדר התייחסות קוד פונקציה GetOrderAuthCodeAndReference פרטיים () ( $ result = $ this-> mOrderManager-> GetOrderAuthCodeAndReference ( $ this-> mOrderId); if (empty ($ result)) לזרוק חריגה ($ this-> mOrderId. "אינו קיים"); התוצאה $ this-> mAuthCode $ = [ 'auth_code']; התוצאה $ this-> mReference $ = [ 'הפניה']; ) / / מקבל קוד אישור הסדר פונקציה GetAuthCode ציבורי () ( if (empty ($ this-> mAuthCode)) $ this-> GetOrderAuthCodeAndReference (); return $ this-> mAuthCode; ) / / מקבל קוד הפניה הסדר פונקציה GetReference ציבורי () ( if (empty ($ this-> mReference)) $ this-> GetOrderAuthCodeAndReference (); return $ this-> mReference; ) / / קבע את תאריך צו של הספינה תפקיד ציבורי SetDateShipped () ( $ this-> mOrderManager-> SetDateShipped ($ this-> mOrderId); ) ) ?> [/ php] אנא עזור מישהו זה יהיה הרבה יותר מוערך. הולך די מטורף. תודה רבה |
|
#2
| ||||||||||||
| ||||||||||||
| האם זה מקבל נפתרה?
__________________
http://www.geeklog.net/forum/viewtop...howtopic=75900 זה דן. אני כבר לא נעשה שימוש בכל אגס מודולים תחת Windows, כך הוא מנסה את הדרך הטובה ביותר קדימה. המערכת שלי: טים
|