WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Strange Directory Issues for Uploads Folder (3 posts)

  1. WebTechGlobal
    Member
    Posted 4 years ago #

    Alright,
    about to start hitting my head of the screen with this one its just strange to me.

    CSV Files Folder: http://www.csv2post.com/wp-content/uploads/csv2postfiles/ ERROR - Folder is not present and cannot be created or is just not writeable! The directory expected is http://www.csv2post.com/wp-content/uploads/csv2postfiles/ and this should be reported to WebTechGlobal.

    That is a self created error for debugging and it suggests that a folder named "csv2postfiles" does not exist in the "uploads" directory and I use this...

    $filename = WP_CONTENT_URL . '/uploads/csv2postfiles/';
    echo $filename;

    to establish the correct directory. However I used this previously...

    $filename = ABSPATH . $uploadpath . '/csv2postfiles/';

    and it worked just fine despite $filename becoming the exact same url. It's just crazy because I also used this...

    $filename = $uploadpath . '/csv2postfiles/';

    and that worked too, so in short am confused. I must be making a newbie mistake and not realising it or wordpress has some strange things going on with the upload directory.

    Some help would be great. Oh I should also add that different methods work on different blogs and if one method works fine then you change the upload directory, then change it back to what it was previous to the change then it breaks!

    Looking forward to an answer on this lol

    Thanks everyone
    Ryan

  2. WebTechGlobal
    Member
    Posted 4 years ago #

    Dam I can't believe I realised the fix after posting this..

    WP_CONTENT_DIR

    I only just begun using these defined values and didnt think about the fact it had "URL" on the end!

    Hopefully this helps someone else quickly lol

  3. alism
    Member
    Posted 4 years ago #

    -- edit: doesn't matter! --

Topic Closed

This topic has been closed to new replies.

About this Topic