« पीछे | PHP Introduction | आगे » |
---|
✯ वेबसाइट को डायनामिक बनाने के उद्देश्य से Rasmus Lerdorf ने 1996 में PHP लैंग्वेज का अविष्कार किया था । PHP लैंग्वेज ऑब्जेक्ट ओरिएंटेड मॉडल पर बनी ओपन सोर्स सर्वर साइड स्क्रिप्टिंग लैंग्वेज हैं। जिस प्रकार अलग-अलग प्रोग्रामिंग भाषा में लिखी गयी फाइल का एक्सटेंशन नाम भिन्न - भिन्न होता हैं उसी तरह PHP प्रोग्रामिंग लैंग्वेज में लिखी गयी फाइल का एक्सटेंशन नाम .php होता हैं
Rasmus Lerdorf invented the PHP language in 1996 with the aim of making the website dynamic. PHP language is open source server side scripting language built on object oriented model. Just as the extension name of the file written in different programming language varies, similarly the extension name of the file written in PHP programming language is .php.
✯ शुरुआती दौर में इस प्रोग्रामिंग लैंग्वेज का इस्तेमाल वयक्तिगत मुख्य पृष्ठ को गतिशील बनाने के उद्देश्य से किया जाता था जिस कारण इस लैंग्वेज का नाम PHP रखा गया था । प्रारम्भिक समय में इसका पूरा नाम पर्सनल होम पेज हुआ करता था ।
In the initial phase, this programming language was used for the purpose of making the personal main page dynamic, due to which this language was named PHP. In the initial times, its full name used to be Personal Home Page.
✯ इस लैंग्वेज में समय-समय पर कई बदलाव होते रहे जिसे नवीनतम संस्करणों के साथ में सार्वजनिक किया गया । PHP को वर्तमान समय में Hypertext Preprocessor के नाम से जाना जाता हैं । PHP शोधकर्ताओं ने PHP के सबसे नवीनतम वर्जन 8.2.3 को 14 फ़रवरी 2023 को सार्वजनिक किया ।
There were many changes in this language from time to time, which were made public with the latest versions. PHP is currently known as Hypertext Preprocessor. PHP researchers made the latest version of PHP 8.2.3 public on 14 February 2023.
✯ PHP प्रोग्रामिंग लैंग्वेज को HTML के साथ में लिखा जा सकता हैं जिसके लिए उस फ़ाइल का एक्सटेंशन नाम .html से बदलकर .php करना होगा जिस फाइल में आप PHP का उपयोग करना चाहते हैं । किसी वेबपेज में PHP को दो तरह से शामिल किया जा सकता हैं -
PHP programming language can be written in conjunction with HTML, for which the extension name of the file in which you want to use PHP needs to be changed from .html to .php. PHP can be included in a webpage in two ways -
✧ In-Page PHP (आंतरिक पेज PHP)
वेबपेज में किसी भी स्थान पर PHP का इस्तेमाल किया जा सकता हैं । एक वेब पेज में जरुरत के अनुसार एक या एक से अधिक बार PHP Code को भिन्न-भिन्न स्थानों पर प्रयोग में लिया जा सकता हैं जिसके लिए अलग-अलग स्थान पर अलग से PHP को Start और End करने की आवश्ययकता होगी ।
PHP can be used anywhere in a webpage. PHP code can be used at different places one or more times as per the need in a web page, for which there will be a need to start and end PHP separately at different places.
✧ External PHP (बाह्य PHP)
किसी PHP फाइल में लिखी गई जानकारी को अन्य PHP फाइल में शामिल करने के लिए External PHP का उपयोग किया जाता हैं जिसके लिए PHP के include फंक्शन का इस्तेमाल किया जाता हैं ।
External PHP is used to include the information written in a PHP file in another PHP file, for which PHP's include function is used.
अभ्यास के लिए आपको XAMPP जैसे Local सर्वर की आवश्यकता होगी । PHP फाइल के रिजल्ट के लिए PHP फाइल को सर्वर पर ही Execution (निष्पादित) किया जा सकता है क्योंकि यह सर्वर साइड स्क्रिप्टिंग लैंग्वेज हैं ।
<?php ... ?> क्या है ?✯ वेबसाइट के किसी भी पेज में PHP को उपयोग में लेने के लिए सर्वप्रथम उस पेज में PHP को स्टार्ट करना होगा जिसे <?php से निष्पादित किया जाता हैं तथा जहां पर PHP के फंक्शन पूर्ण हो जाते हैं वहां पर PHP को बंद करने के लिए ?> टैग का इस्तेमाल किया जाता हैं । एक पेज में इस तरीके से अलग - अलग स्थान पर अनेकों बार PHP के फंक्शन प्रयोग में लिए जा सकते हैं लेकिन ध्यान रहे की PHP को हर बार अलग से स्टार्ट और एन्ड टैग देना आवश्यक हैं ।
To use PHP in any page of the website, first of all, PHP has to be started in that page which is executed with <?php and to stop PHP where PHP functions are completed ?> tag is used. In this way, PHP functions can be used multiple times at different places in a page, but keep in mind that it is necessary to give separate start and end tags to PHP each time.
echo (" "); क्या है ?✯ PHP की मदद से किसी भी जानकारी को आउटपुट के तौर पर प्रदर्शित करवाने के लिए PHP में echo(" "); फंक्शन का उपयोग किया जाता हैं । Quotation mark (उद्धरण चिह्न) के अंदर जो कुछ जानकारी हम दर्ज करेंगे उसे PHP का echo फंक्शन ब्राउज़र पर परिणाम के तोर पर प्रदर्शित करेगा ।
To display any information as output with the help of PHP, echo(" "); function is used. Whatever information we enter inside the Quotation mark, PHP's echo function will display it as a result on the browser.