Create a Folder If It Doesn’t Already Exist

Some hosting companies may not have some files when you install wordpress automatically. You must change the folder settings to correct this situation. In the following code, if there is a folder, we give this folder permission as 777. With this code, you can change any folder permissions you want. Note: That 0777 is already the default mode for directories and may still be modified by the current umask.

 

if (!file_exists('path/to/directory')) {
    mkdir('path/to/directory', 0777, true);
}

8 Comments

  • zvodret iluret


    Hi there just wanted to give you a quick heads up. The text in your article seem to be running off the screen in Opera. I’m not sure if this is a format issue or something to do with web browser compatibility but I figured I’d post to let you know. The design look great though! Hope you get the issue resolved soon. Cheers

    reply
  • Zamudio


    I have been exploring for a bit for any high quality articles or blog posts on this sort of area . Exploring in Yahoo I at last stumbled upon this website. Reading this information So i am happy to convey that I have an incredibly good uncanny feeling I discovered just what I needed. I most certainly will make certain to don’t forget this website and give it a glance on a constant basis.

    reply
  • christian


    The internet has produced everything possible that
    professionals can be found online as a way too focus
    on the stress in the business owners. The the desired
    info iss then voted on and whoever has due to the best answer will win. It iss in this environment
    that Bing has put their hands up, and a lot of feel
    the search algorithms tend to be more focused on content than many of the other search engines like google.

    reply
  • florian


    Everything is very open with a clear clarification of the issues.
    It was truly informative. Your site is extremely helpful.
    Many thanks for sharing!

    reply
  • Luci


    I feel this is one of the most significant information for me. And i’m satisfied studying your article. But should commentary on some basic issues, The web site style is ideal, the articles is actually excellent : D. Good job, cheers

    reply
  • maribraine


    Thanks for some other informative blog. Where else may I get that type of info written in such a perfect manner? I’ve a mission that I’m simply now running on, and I’ve been on the look out for such info.

    reply

Leave a Reply to zvodret iluret cancel

Your email address will not be published. Required fields are marked *