I've run into a few cases with WordPress installs with Bluehost where I've encountered errors with my WordPress theme because the uploads folder wp-content/uploads
was not present.
Apparently the Bluehost cPanel WP installer does not create this folder, though HostGator does.
So I need to add code to my theme that checks for the folder and creates it otherwise.
转载于:https://stackoverflow.com/questions/2303372/create-a-folder-if-it-doesnt-already-exist