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

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




                            rmdir($directory_path);
                            echo “Directory and its contents deleted successfully: $directory_path”;

                  }

                  else
                  {

                            echo “Directory not found: $directory_path”;

                           }
              ?>

                     </body>

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

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

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

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














           टा  2: फ़ाइल बनाना

           1  टे  एिडटर ओपन कर
           2  िन िल खत कोड िलख

                              <html>

                              <body>
                            <?php

                               // Specify the file name and path:

                  $filename = “my_new_file.txt”;  // Modify with desired name and location
                  // Open the file in write mode (creates the file if it doesn t exist):

                  $handle = fopen($filename, “w”) or die(“Unable to open file!”);

                  // Write content to the file:
                  $content = “This is the content of my new file!”;





                                                           283

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