title: How to give File permission for creating and deleting a folder in online webserver using PHP
body: <p>Can anyone tell how to give or set file permission for creating and deleting a folder in webserver!</p>
  
  <p>Creating a Folder</p>
  
  <pre><code>        mkdir("FolderName", 0755, true);
  </code></pre>
  
  <p>Deleting a folder</p>
  
  <pre><code>    $files = glob("FolderName" . '*', GLOB_MARK );
  chmod("FolderName", 0777);
  foreach( $files as $file ){
      if( substr( $file, -1 ) == '/' )
          delTree( $file );
      else
          unlink( $file );
  }
  rmdir( "FolderName" );
  </code></pre>
  
  <p>The problem is that i am able to create and delete the folder in local server but i am not able to do that in online server? So can anyone tell how to enable permission through code using php?</p>