Page 269 - CITS - CSA - TP (Volume 1) - Hindi
P. 269

कंप्यूटर सॉफ्टवेयर एप्लीकेशन- CITS



           अ ास 53:  ाउज़र म  िलखना, फ़ॉम  से इनपुट  ा  करना, आउटपुट बफ़ रंग, कॉमन मैथ,र डम

                              नंबर, फ़ाइल अपलोड, फ़ाइल डाउनलोड, एनवायरनम ट वे रएबल दिश त करना
                              (Demonstratethe Writing to the browser, Getting input from forms, Output
                              buffering, Common math, Random numbers, File upload, File download,
                              Environment variables)



            उ े
           इस अ ास के  अंत म  आप यह कर सक  गे
           •  PHP का उपयोग करके   ाउज़र म  कं ट ट िलख
           •  PHP म  कॉमन मैथ और र डम नंबर फ़ं  न की जाँच कर
           •  PHP का उपयोग करके  सव र से डाउनलोड अपलोड कर ।

           आव कताएं  (Requirements)
           साधन/साम ी (Tools/Materials)

           •  लेटे  कॉ  फ़गरेशन वाला कं  ूटर/लैपटॉप             •  PHP
           •  ऑपरेिटंग िस म: िवंडोज़ 10 या 11                   •  टे  एिडटर
           •  अपाचे वेब सव र                                   •  वेब  ाउज़र


            ि या (Procedure)

           टा  1:  ाउज़र पर िलखना
           1  टे  एिडटर ओपन कर

           2  िन िल खत कोड िलख

                              <html>
                              <body>

                               <?php
                         // Example with echo
                         echo “Hello, world!”;

                         // Example with print
                         print “This is also displayed”;
                         // Example with printf

                         $name = “Alice”;
                         printf(“Welcome, %s!”, $name);
                         // Example with sprintf

                         $message = sprintf(“You have %d unread messages.”, 3);
                         echo $message;
                         // Declare variable and store the string

                         $output = “A computer science portal”;
                         echo “<script>console.log(‘Value of variable: “ . $output . “  );</script>”;




                                                           253
   264   265   266   267   268   269   270   271   272   273   274