Jump to content

include files in php


test006

Recommended Posts

Hi,
I have read the following tutorial Including Files in PHP - Beginner Tutorial and i still have some questions. I came across this when working on my current project.
I have all my php files under following directory:
/var/www/test/code
So all my php scripts are under code directory as shown above....
No i want to include files within my php scripts that are from a directory that is not inside /var/www directory.
I want to have a include directory that inside /var directory so my include directory is /var/include.

My question is how do i include files in my script that are located in a directory that is outside the /var/www directory as in my case this is /var/include directory...

Do i need to enable read permissions for my web server to be able to read files from /var/include directory??

Please advise...

Thanks for help in advance..
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.