在google上找不到任何答案,所以这是我尝试其他方法之前的最后一次尝试。php创建341权限的文件夹
我有这样的脚本:
// get current year and month
$cur_year = date('Y');
$cur_month = date('m');
$long_type = $this->getFile_longtype();
$folder = $_SERVER['DOCUMENT_ROOT']."/".FOLDER_CMS."/uploads/$long_type/$cur_year/$cur_month";
// check whether the folder exists
if(!is_dir($folder)){
// try to make the folder recursively
if(!mkdir($folder,"0777",true)){
logError($message, __FILE__, __LINE__);
throw new Exception("Failure creating proper directories");
}
}
,使其工作,我chmod'ed的上传目录和它的所有文件,并显示目录为777
长(这里尤为明显建议?)类型评估为'图像',这是一个目录已经在服务器上创建。
现在,脚本使用权限341创建名称为year的文件夹。这不是我想要的,因为它终止递归文件夹堆积或阻止它的内容。
任何帮助或建议?
PHP版本:5.2.5
configure命令: '的./configure' --enable-bcmath时'--enable-日历 '--enable-EXIF'“ - enable-ftp''--enable-gd-native-ttf''--enable-libxml''--enable-magic-quotes''--enable-mbstring''--enable-pdo = shared'' - enable-soap''--enable-sockets''--enable-wddx''--enable-zip''--prefix =/usr/local''--with-apxs2 =/usr/local/apache/bin/apxs''--with-bz2''--with-curl =/opt/curlssl /''--with-curlwrappers''--with-freetype-dir =/usr''--with-gd'' --with-gettext''--with-imap =/opt/php_with_imap_client /''--with-imap-ssl =/usr''--with-jpeg-dir =/usr''--with-kerberos' '--with-libexpat-dir =/usr''--with-libxml-dir =/opt/xml2''--with-libxml-dir =/opt/xml2 /''--with-mcrypt =/opt/libmcrypt /''--with-mhash =/opt/mhash /''--with-mssql =/usr/local/freetds''--with-mysql =/usr''--with-mysql-sock =/var/lib/mysql/mysql.sock''--with-mysqli =/usr/bin/mysql_config''--with-openssl =/usr''--with-openssl-dir =/usr''--with-pdo-mysql = shared''--with-pdo-sqlite = shared''--with -png-dir =/usr''--with-pspell''--with-sqlite = shared''--with-tidy =/opt/tidy /''--with-ttf''--with-xmlrpc ''--with-xpm-dir =/usr''--with-xsl =/opt/xslt /''--with-zlib''--with-zlib-dir =/usr'
亚历克斯,你摇滚! – 2010-09-24 14:30:46