home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 4 / hacker04 / 04_HACK04.ISO / src / PHP / makedirs.php3.txt < prev    next >
Encoding:
Text File  |  2002-05-06  |  1.1 KB  |  33 lines

  1. Make Directories 
  2.  
  3.  
  4. This just simplifies how you can use PHP to automatically generate directorys without actually haveig to FTP to your server to make one. Try the code and develop from it! 
  5.  
  6. <?php 
  7. ############################################################## 
  8. ## MakeDir - Andrew Heebner - Elite@LibAir.com - 10/03/1999 ## 
  9. ##                                                          ## 
  10. ##               NAME THIS FILE - tests.php3                ## 
  11. ############################################################## 
  12.  
  13. // START MAIN MAKEDIR FUNCTION 
  14. if ($makedir ==   "MakeDir") { 
  15.    $content =  "$direct"; 
  16.    $dirmake = mkdir( "$content", 0777); 
  17.  
  18. // DISPLAY LINK TO DIRECTORY AFTER MAKING IT 
  19. PRINT     "<center>\n"; 
  20. PRINT     "<a href=\"$content\">CLICK HERE TO VIEW YOUR NEW DIRECTORY</a>\n"; 
  21. PRINT     "</center>\n"; 
  22.  
  23.  
  24. // MAIN FORM TO INPUT INFORMATION 
  25. PRINT     "<form action=\"tests.php3?action=direct\">\n"; 
  26. PRINT     "<INPUT TYPE=\"text\" NAME=\"direct\" SIZE=\"15\">\n"; 
  27. PRINT     "<br>\n"; 
  28. PRINT     "<INPUT TYPE=\"submit\" NAME=\"makedir\" VALUE=\"MakeDir\">\n"; 
  29. PRINT     "</FORM>\n"; 
  30.  
  31. ?>
  32.