修改conf/httpd.conf文件,添加avatar到允许访问<Directory ~ "D:/MYOA/webroot/attachment/(..|avatar)/">Order allow,denyAllow from all</Directory>。