पुरालेख के लिए ‘अंतिम विषय’ श्रेणी

PHP त्रुटि नेस्टिंग स्तर भी दीप पुनरावर्ती निर्भरता

12 मार्च, 2010

मैं PHP स्थापित किया है 5.2 एक अपने परीक्षण कंप्यूटर पर आज और कोड है कि पहले संस्करण में ठीक काम के टुकड़े के एक जोड़े 5.1.6 नए संस्करण में घातक त्रुटियों को फेंक दिया. त्रुटि संदेश था "नेस्टिंग भी गहरे स्तर पर - पुनरावर्ती निर्भरता?"और यह एक छोटे से समय ले लिया

करने के लिए नीचे समस्या की जड़ ट्रैक. यहाँ मैं क्या गलत किया था.

PHP में दो ऑपरेटरों तुलना कर रहे हैं, == और ===. यह आमतौर पर कि पहले ज्ञात है प्रकार के बारे में सख्त नहीं है, लेकिन दूसरे नंबर पर है. इतना, उदाहरण के लिये

गूंज ( == झूठी 0 ); // सच

गूंज ( झूठी === 0 ); // झूठा

- 0 एक पूर्णांक है और झूठे एक बूलीयन है

मेरी समस्या वस्तुओं के साथ गैर सख्त टाइप का उपयोग करने से उठी.

$एक = नई MyObj();
$ख = नई MyObj();
अगर( $एक $ == ख )

मैं नहीं माना जाता था कि मैं क्या इस कोड के साथ कर रहा था. जब दो वस्तुओं की तुलना गैर सख्त तुलना ऑपरेटर का उपयोग करके (==) PHP वस्तुओं के सभी गुणों की तुलना और अगर वे मैच रहे हैं वस्तुओं के बराबर नहीं समझा. अगर वे मेल नहीं खाते वे समान नहीं हैं. प्रभाव में, हम प्रत्येक वस्तु के सभी गुणों का एक पुनरावर्ती तुलना है, और अपने सभी गुण, आदि. जब तक हम तार और integers जैसे बुनियादी डेटा प्रकार पहुंच.

अगर, तथापि, हम सख्त तुलना उपयोग (===), PHP की जाँच करेगा कि क्या दो वस्तुओं वही वस्तु है, समान गुणों के साथ न सिर्फ वस्तुओं.

वर्ग MyObj
{
$ सार्वजनिक p;
}

$एक = नई MyObj();
$ख = नई MyObj();
$ग = नए MyObj();
$एक>p = 1;
$ख>p = 1;
$ग>p = 2;
गूंज ( $एक $ == ग ); // झूठा
गूंज ( $एक $ == ख ); // सच
गूंज ( $एक === ख $ ); // झूठा

समस्या खड़ी होती है अगर आप अपने वस्तुओं में परिपत्र संदर्भ गुण है. इतना, उदाहरण के लिये

वर्ग MyObj
{
$ सार्वजनिक p;
}
वर्ग OtherObj
{
$ q जनता;
}

$एक = नई MyObj();
$ख = नई OtherObj();
$एक>P = $ ख;
$ख>Q = $ एक; // प्रचल संदर्भ: $एक>पी>=== एक $ q

$ग = नए MyObj();
$घ = नई OtherObj();
$ग>P = $ d;
$घ ->= $ Q ग;// एक प्रचल संदर्भ: $ग>पी>$ q ग ===

गूंज ( $एक $ == ग ); // घातक त्रुटि:
बहुत गहरे स्तर पर नेस्टिंग – पुनरावर्ती निर्भरता?

आदेश में एक $ $ करने के लिए तुलना करने के लिए ग, PHP उनके गुणों की तुलना चाहिए. PHP में तर्क जाता है तो कुछ इस तरह: $ग $ == अगर डॉलर एक>p == $c->पी अगर डॉलर ->p->क्ष == $ ग पी == $ ग -gt;क्ष अगर डपीलर ->p->q->p == $c->p->क्ष ->पी आदि. अनिश्चित काल.

PHP 5.1 करने पर किसी तरह की समस्या चिकनी लग रहा था (शायद recursion का एक निPHP्चित स्तर पर यह केवल झूठी लौट के बाद) – और आमतौर पर यह ठीक काम किया. PHP 5.2 सही ढंग से ऊपर घातक त्रुटि पैदा करता है.

एक बार जब आप इस समस्या का पता, समाधान आसान है – कड़े मुकाबले का उपयोग.

गूंज ( $एक $ === ग ); // झूठा (और कोई त्रुटि)

सख्त तुलना बस जाँच करें कि क्या दो वस्तुओं की स्मृति में एक ही स्थान पर हैं और इसलिए भी संपत्तियों के मूल्यों में नहीं लगती होगी.

नायब. एक ही समस्या पैदा कर सकते हैं जब नकार तुलना ऑपरेटर्स का उपयोग (प्रयोग !के बजाय == !=) और जब in_array का उपयोग (फायदा in_array तीसरे पैरामीटर सख्त तुलना इंगित करने के लिए).

साझा करें और आनंद लें

  • wp socializer sprite mask 16px PHP Error Nesting Level Too Deep Recursive Dependency
  • wp socializer sprite mask 16px PHP Error Nesting Level Too Deep Recursive Dependency
  • wp socializer sprite mask 16px PHP Error Nesting Level Too Deep Recursive Dependency
  • wp socializer sprite mask 16px PHP Error Nesting Level Too Deep Recursive Dependency
  • wp socializer sprite mask 16px PHP Error Nesting Level Too Deep Recursive Dependency
  • wp socializer sprite mask 16px PHP Error Nesting Level Too Deep Recursive Dependency
  • wp socializer sprite mask 16px PHP Error Nesting Level Too Deep Recursive Dependency
  • wp socializer sprite mask 16px PHP Error Nesting Level Too Deep Recursive Dependency
  • wp socializer sprite mask 16px PHP Error Nesting Level Too Deep Recursive Dependency

और कैसे प्राप्त करने के लिए ईमेल का उपयोग पार्स POP3 और PHP

1 मार्च, 2010

मैं कैसे आने वाली मेल के लिए प्रोसेसर लिखने के लिए पर कुछ तरीकों का वर्णन करना चाहूँगा. मैं इस तरह के हेरफेर करने के लिए प्रयोग किया था पार्स ई मेल विभिन्न स्रोतों से प्राप्त. यह अपने खुद के स्पैम फिल्टर प्रणाली लेखन के लिए उपयोगी हो सकता है, जवाब दे मशीन या ई टिकट प्रणाली के आवेदन प्राप्त करने के लिए मेल.

ई - मेल पार्सर एल्गोरिथ्म हम की जरूरत को लागू करने के लिए

  1. कनेक्ट और लॉग पर ई - मेल सर्वर से
  2. आने वाले पत्रों की संख्या की गिनती
  3. ई recive सर्वर से मेल POP3 प्रोटोकॉल का उपयोग
  4. प्रक्रिया ई - मेल शीर्ष लेख और शरीर और पार्स करना
  5. … किसी भी अतिरिक्त कार्यों को लागू

अच्छा, वहाँ बहुत विशिष्ट कार्य के लिए है PHP कोडन, इसलिए हम होस्टिंग की जरूरत है कि बाहरी कनेक्शन समर्थन करता है. मैं पूरी तरह क्योंकि पहले से ही बहुत प्रतिभाशाली प्रोग्रामर द्वारा महसूस किया गया है निर्णय लिखने का प्रस्ताव नहीं है. उदाहरण के लिए, आप एक तैयार मॉड्यूल जो स्वीकार लेने की अनुमति देगा ई सकता है एक दूरस्थ सर्वर से मेल.

मैनुअल Lemos है और उसके लिए धन्यवाद मॉड्यूल (php वर्ग) जो pop3.php नाम.

अपने कोड के लिए उस वर्ग कनेक्ट करने के लिए, तुम बस में शामिल हैं या आदेश की आवश्यकता होती है उपयोग करने की आवश्यकता: आवश्यकता(“pop3.php”);


hostname=$hostname;
$result=$pop3_connection->Open();

// We are trying to open connection and display the result
echo $result;
// Trying to logon and display the error if any appear
$error=$pop3_connection->Login($user,$accesscode,$apop);
अगर ($त्रुटि<>'पासवर्ड त्रुटि: Logon विफलता: अज्ञात उपयोगकर्ता नाम या पासवर्ड बुरा. ') {echo $error; निकास;}
// Now get the statistic how many emails are stored and the size of them $result=$pop3_connection->Statistics($messages, $size);
गूंज "$hostname contains  $messages की $size bytes.";

//..... वहाँ हम ई प्राप्त कर सकते हैं-चक्र में मेल और उन्हें विश्लेषण .... //

// अगर कुछ भी नहीं करने के लिए - we can close the connection
$error=$pop3_connection->Close(); //
echo $error;
?>

अब हम जानते हैं कि कैसे कनेक्ट और लॉग इन करने के लिए POP3 सर्वर पर इनबॉक्स में ईमेल की संख्या अनुरोध करता है और उन्हें कैसे आकार. अगला, हम एक ई - मेल प्राप्त करने और हेडर और शरीर सरणी पार्स चाहिए.

जारी होना

साझा करें और आनंद लें

  • wp socializer sprite mask 16px How to receive and parse emails using POP3 and PHP
  • wp socializer sprite mask 16px How to receive and parse emails using POP3 and PHP
  • wp socializer sprite mask 16px How to receive and parse emails using POP3 and PHP
  • wp socializer sprite mask 16px How to receive and parse emails using POP3 and PHP
  • wp socializer sprite mask 16px How to receive and parse emails using POP3 and PHP
  • wp socializer sprite mask 16px How to receive and parse emails using POP3 and PHP
  • wp socializer sprite mask 16px How to receive and parse emails using POP3 and PHP
  • wp socializer sprite mask 16px How to receive and parse emails using POP3 and PHP
  • wp socializer sprite mask 16px How to receive and parse emails using POP3 and PHP

नि: शुल्क mbox कनवर्टर करने के लिए EML

February 14th, 2010

It is good that today there are still programmers who write excellent software at no cost. What I am talking about? Want to tell you how I found another program for my collection of must-have utilities.

Apple MAC computers are widespread used in our office. This is the policy of the company. Despite the policy of the company, our boss prefers Windows and uses its featured laptop. Who should break the rules? Of course the boss, the rest is not allowed icon smile Free MBOX to EML Converter I must say that I share that preference, so I have installed Windows 7 to my home laptop.

Our attorneys should pass some investigations from time to time and they should review the correspondence of our staff but they accepted only the files in the Outlook PST format.

In a previous article I wrote about incredibly necessary program Outlook आयात विज़ार्ड, which saved me a lot of time when importing eml files into Outlook. The task that I had to complete just put me into shock. It is necessary to convert e-mails of our employees into the Outlook .pst file. How can we reconcile incompatible things? How to combine MAC OS with the Windows?

For a start I had to conduct an audit and found that our employees using various e-mail clients. There are just some of them: Turnpike, Mac Mail, Entourage, MailCopa, थंडरबर्ड, Eudora, Berkeley Mail. The conversion task did not seem doable. I decided that if a search engine does not immediately bring me the solution, then I will say to my Boss that the mission is impossible.  So I did search for the phraseentourage, thunderbird, mac mail, to eml to pst free mboxand the search was successful, it proved something I never expected. और भी, the word FREE does not tally with me with the task that had to do. Imagine my surprise when on the description page of the another one eml to pst converter, I found the free mbox to eml converter.

The software review showed that despite the fact that the program is free, it has the incredible potential. Nevertheless the mailbox files format of different programs vary, the program was able accurately identify all meta signatures and correctly recognize the file format. I’m not kidding, all mailbox files Turnpike, Mac Mail, Entourage, MailCopa, थंडरबर्ड, Eudora और Berkeley Mail were transformed into arrays of e-mail files in EML format. Having the Outlook आयात विज़ार्ड at my hands allow me to import all eml files into Outlook PST.

नि: शुल्क mbox कनवर्टर करने के लिए EML works as a batch-processor. First you should select all necessary mbox files from which you want to retrieve eml messages. It is easy to select all files with the Shift key. After that, you need click the Processing button, point to the empty directory at your hard drive and wait for the result. The program processing all files sequentially, it creates a directory for each file and fill it with extracted eml files. In my case I had a lot of mailbox files that were named in accordance with user-names of our employees. Eventually I got a lot of folders, each had a user name and contained all corresponding eml files retrieved from the mailbox.

साझा करें और आनंद लें

  • wp socializer sprite mask 16px Free MBOX to EML Converter
  • wp socializer sprite mask 16px Free MBOX to EML Converter
  • wp socializer sprite mask 16px Free MBOX to EML Converter
  • wp socializer sprite mask 16px Free MBOX to EML Converter
  • wp socializer sprite mask 16px Free MBOX to EML Converter
  • wp socializer sprite mask 16px Free MBOX to EML Converter
  • wp socializer sprite mask 16px Free MBOX to EML Converter
  • wp socializer sprite mask 16px Free MBOX to EML Converter
  • wp socializer sprite mask 16px Free MBOX to EML Converter

अंतरिक्ष शटल वीडियो शुरू से अंत तक

25 जनवरी, 2010

नासा! मैं यह बिल्कुल आश्चर्यजनक वीडियो मिला. की कार्रवाई की बारह मिनट अंतरिक्ष शटल भागों. पृथ्वी और समुद्र के नीचे से प्रारंभ. शटल के प्रत्येक हिस्से पर अंतरिक्ष कैमरों, बहुत दिलचस्प लगता है. बहुत सुंदर अंतरिक्ष शटल वीडियो.

एसटीएस 129, वीडियो के रूप में डाला एसई द्वारा संकलित&मैं JSC में यहाँ कल्पना भूमि की सब से टीम, हवा, एट और SRB संपत्ति.

साझा करें और आनंद लें

  • wp socializer sprite mask 16px Space Shuttle video from start to end
  • wp socializer sprite mask 16px Space Shuttle video from start to end
  • wp socializer sprite mask 16px Space Shuttle video from start to end
  • wp socializer sprite mask 16px Space Shuttle video from start to end
  • wp socializer sprite mask 16px Space Shuttle video from start to end
  • wp socializer sprite mask 16px Space Shuttle video from start to end
  • wp socializer sprite mask 16px Space Shuttle video from start to end
  • wp socializer sprite mask 16px Space Shuttle video from start to end
  • wp socializer sprite mask 16px Space Shuttle video from start to end