php - How to create a folder in site->default->files with write read permissions with Drupal? -


im working on ubuntu , need create folder in drupal's default->files folder write permission able add files folder later on.

here code i'm having,

please help.

drupal_mkdir('public://' . $new_dir . '/'); $file = file_copy($file, 'public://' . $new_dir . '/' . $file_name); 

    drupal_mkdir('public://' . $new_dir , 0777); 

if need recursive set third argument true.

update:

    $oldumask = umask(0);     drupal_mkdir("public://". $new_dir , 0777);     umask($oldumask); 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -