SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2012
    Location
    Web
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Directory traversal and file inclusion problem

    Hello everyone,

    I followed Alex's register and login series from PHP Academy. I made one like his just the same way just that my CSS files were different. Now this is my problem.

    My bootstrap folder contains css, js and img folders. My core folder contains init file, database folder having connect file and functions folder having general functions and user functions files. My includes folder contains the header, footer, navbar and all, along with an overall folder having overall header and overall footer.

    All the files included above are linked and relative to the index.

    I created a new folder called forums in the root directory and I put an index file inside it. I just put the path as include '../core/init.php', include '../includes/overall/header.php', etc. Just added two dots to traverse back and then include the files and styles but I am getting all sorts of warnings and errors. I want to create a new folder in the root directory and include all these files, functionality and styles. Please help me do this.

    Thank You!scr (Copy).png

  2. #2
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,222
    Mentioned
    237 Post(s)
    Tagged
    1 Thread(s)
    The attachment can't be seen... it is simply too small.

    It would be better if you tell us which errors you get and the code of the page where you get that error.

    you can use the [code][/code] tags to do so

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2012
    Location
    Web
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,222
    Mentioned
    237 Post(s)
    Tagged
    1 Thread(s)
    Just out of curiosity... is your directory named "Includes" or "includes". Some web servers are case sensitive and this may affect your programming.

  5. #5
    SitePoint Enthusiast
    Join Date
    Nov 2012
    Location
    Web
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's "includes" and I always check for typos and case sensitivity. Not a problem here either.

  6. #6
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,222
    Mentioned
    237 Post(s)
    Tagged
    1 Thread(s)
    It seems that you found your answer. I can see that the page in stackoverflow has been removed by your own request. That's why I think that the problem is solved.

    Sorry that I didn't pay more attention, though. I had a few days away from the computer and I was not checking SP regularly.


Bookmarks

Posting Permissions

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