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

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




                                 foreach( $content as $line)
                                 {

                                        echo $line;

                                 }
                         }

                         else

                         {
                                 echo “ERROR: File does not exist.”;

                         }

              ?>

                     </body>
                             </html>

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

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

           5   ाउज़र ओपन कर  और िन  एड ेस टाइप कर
              http://localhost/foldername/
           6  रन करने के  िलए php फ़ाइल पर   क कर  और आउटपुट वेरीफाई कर












           टा  10: फ़ाइल िडलीट करना
           1  टे  एिडटर ओपन कर
           2  िन  कोड िलख

                              <html>
                              <body>

                            <?php
                      // Specify the file name
                         $fileName = ‘example.txt ;
                                          // Check if the file exists before attempting to delete

                                          if (file_exists($fileName))
                                          {

                                                  // Attempt to delete the file
                                                  if (unlink($fileName))



                                                           292

                                       CITS : IT & ITES - कं  ूटर सॉ वेयर ए ीके शन - अ ास 55
   303   304   305   306   307   308   309   310   311   312   313