Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy PHP how to go back 1 dir to get inside another dir?

    include './includes/login.inc.php';
    this works in the same scenario just a different folder yet

    this one doesn't work
    include './classes/membership.cls.php';

    yes spelling is correct i have checked so many times



    I dont no what is going on please help






    i have also tryed require and require_once
    do you think it could be because of the name of the file or the directories or the content in the files?!?

    i was searching google and one guy said it could be the folder permissions. i have no idea about messing with that or were to start but i am running xamp,

    hope that extra inf helps
    Last edited by supergrame; 03-13-2009 at 11:47 PM. Reason: needed to add more info

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    A single period represents "current directory"; two periods represents "parent directory". Try "../includes/login.inc.php".

  • #3
    New Coder
    Join Date
    Mar 2009
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Tryed that.

    here is another eg.

    i have a folder (members)-index.php
    i have a folder (constants)-constants.php
    i have a folder (classes)-mysql.cls.php

    in the index i have these lines
    <?php
    session_start();
    require_once 'constants/constants.php';
    new membership();
    ?>

    and the same lines are at the top of constants.php

    yes the mysql.cls.php can require constants
    but index.php in the members folder can not

    remember im new to this maybe i have missed something I had no idea i missed but I have tryed alot difrent ways trial and ERROR.

    any help at all would help me find other ways to try,

    Thank you

  • #4
    New Coder
    Join Date
    Mar 2009
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool

    scrren shot of dir structure
    Attached Thumbnails Attached Thumbnails PHP how to go back 1 dir to get inside another dir?-ss.jpg  


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •