我会尝试一些简单的方法,然后再摆弄无穷无尽的可能性/托管设置:
$target = \'wherever\';
wp_mkdir_p( $target );
if ( wp_mkdir_p( $target ) === TRUE )
{
echo "Folder $target successfully created";
}
else
{
new WP_Error; #... etc. Just tell where the user has to make a new folder with the name xy
// or if you\'re kool, you use _doing_it_wrong(); ... ;-)
}