Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6538099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:41:44+00:00 2026-05-25T10:41:44+00:00

I have a folder that looks like this sorta /optik |- shadow – auth.ini

  • 0

I have a folder that looks like this sorta

/optik
   |- shadow
    - auth.ini
   |- htdocs
       |- index.php 

and I have an actual directory

/
  |- skel
      |- include.php

now, i made a symbolic link shadow from skel, so what ever I put in skel will appear in the shadow folder. I did this because I have dynamic files in skel that I would be changing from time to time, so i didn’t want to keep having duplicate copies of the contents of skel in each of my users folders. So I thought of making a shortcut link to it.

But now I was looking to see if in my index.php i could do something like this

index.php

<?
   include "/optik/shadow/include.php";

   // content

and in my include.php

<?
   include "../auth.ini";

   // some stuff with auth.ini

My goal is that I want to know if I can use the symbolic link like an actual dir in PHP’s eyes. Since from the symbolic links perspective it would need to go up 1 directory to access auth.ini, but in the actual skel directory that file doesn’t exist and I would need to specify the entire directory path to my auth.ini. But since the user folders will all differ its impossible to know what directory path to specify.

How can I get something like this to work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:41:46+00:00Added an answer on May 25, 2026 at 10:41 am

    PHP should respect symlinks and follow them as if they were standard directories.

    However, you are still working from the original directory in which index.php resides. This means that the include "../auth.ini"; call will be looking in /optik (the directory above htdocs) rather than the directory above that in which the included file resides.

    You can use a combination of realpath() and dirname() to calculate the actual canonical paths of the files you want to get at.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a folder structure that looks like this: / /bin/myComponent.cfc /reports/index.cfm How
I have a basic website nav layout that looks like this: <li class=folder parent_folder>
I have a folder organization that looks like this: link.sh dist/MyApp-3.0.0/script.sh dist/MyApp-3.0.0/lib/*.jar The link.sh
I currently have a url that looks like this: protocol://folder/file.js I can open this
I have an array of folders/files that looks like this: Array ( [Root Folder
I have a nuspec files node that looks like this: <files> <file src=bin\Release\MyProject.dll target=lib\MyProject.dll
i have a sub that looks like this: Sub open_esy(filename, p As String, p1
I have a directory that looks like this: ProjectFolder/ + project_file + project_file_2 +
I want to have a hierarchy that looks like this (and it has to
I have a directory that looks like this: pages/ folder1/ folder1.filename1.txt folder1.filename2.txt folder2/ folder2.filename4.txt

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.