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

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



                   //  Specify the file name

                  $fileName = ‘my_new_file.txt ;
                  //  Check if the file exists

                  if (file_exists($fileName))

                  {

                          //  File exists, display a success message
                          echo “File ‘$fileName  exists.”;

                  }

                  else

                  {
                         //  File does not exist, display an error message

                         echo “Error: File ‘$fileName  does not exist.”;

                  }
              ?>

                     </body>

                             </html>
           3   ो ाम को C:\Apache24\htdocs म  .php ए ट शन वाले फ़ो र म  सेव कर

           4  Apache सिव स को िवंडोज़ सिव स से रन कर

           5   ाउज़र ओपन कर  और िन  एड ेस टाइप कर
              http://localhost/foldername/

           6  रन करने के  िलए php फ़ाइल पर   क कर  और आउटपुट को वेरीफाई कर













           टा  4: फ़ाइल का आकार िनधा  रत करना

           1  टे  एिडटर ओपन कर

           2  िन िल खत कोड िलख
               <html>

               <body>

                            <?php
                                             // Specify the file name



                                                           285

                                     CITS : IT & ITES - कं  ूटर सॉ वेयर ए ीके शन - अ ास 55
   296   297   298   299   300   301   302   303   304   305   306