Jump to content

how to create a directory with read n write permission in php


smiley_kool

Recommended Posts

hi,

 

i wrote a script in php which will create the directory with permission. the below script wil create a directory but it doesn't give permission to write a file in the directory which is been created.

 

can someone help me out

 

<?php

 

$thisdir = getcwd();

 

if(mkdir($thisdir ."/myfiles" , 0766))

{

  echo "Directory has been created successfully...";

}

else

{

  echo "Failed to create directory...";

 

}

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.