function PUT(&$options) { global $bhsession; #$fn = fopen("wdlog", "w"); #fwrite($fn, print_r($options, true)); #fclose($fn); $newfilepath = bh_fpclean($options['path']); if (bh_checkrights(bh_get_parent($newfilepath), $bhsession['username']) >= 2) { $newfileobj = new bhfile($newfilepath); $newfileobj->filefromstream($options['stream']); return '201 Created'; } else { $newfileobj = new bhfile($newfilepath); $newfileobj->filefromstream($options['stream']); return '201 Created'; } }