Thursday, 24 April 2014

Upload files by php script

By uploading php script to your web server you can upload many files to the server.


<form enctype="multipart/form-data" action="1-2upload.php" method="POST">
 Please choose a file: <input name="uploaded" type="file" /><br />
 <input type="submit" value="Upload" />
 </form>


Create web directry

To create an directy you have many ways, one of the ways is by php script


<form action="" method="post" >
<table width="400" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td colspan="3" align="center">Please write your preferred directory name </td>
  </tr>
  <tr>
    <td>Name </td>
    <td>&nbsp;</td>
    <td><input type="text" name="gname" id="text" value=""></td>
  </tr>

  <tr>
    <td colspan="3" align="center"><input type="submit" name="submit" id="submit" value="Submit"></td>
  </tr>
</table>
</form>



<?php



if (isset($_POST['submit'])) {

$name = $_POST['gname'];


mkdir ("$name", 0777);

}


?>