Jump to content

Recommended Posts

Hello Everyone!

 

I've recent been using Zigmoyd [http://zigmoyd.net] for my web development, but have a small query regarding the include files and paths.

 

when i include the following, it works fine, even although the zend folder is back one directory in my folder.

 

include_once('zigmoyd/config.php');
include_once('template/template.php');
include_once('db/sql.php');
include_once('ums/customize.php');
include_once('done.php');

 

i then try'd the following to go back one directory using ./ and it still worked?

 

include_once('./zigmoyd/config.php');
include_once('./template/template.php');
include_once('./db/sql.php');
include_once('./ums/customize.php');
include_once('./done.php');

 

i then try'd to go back using ../ and a load of error appeared complaining at the files location.

 

include_once('../zigmoyd/config.php');
include_once('../template/template.php');
include_once('../db/sql.php');
include_once('../ums/customize.php');
include_once('../done.php');

 

which one is correct, and why does both normall dir and ./dir work?

 

i'm rather confused. also does anyone know if you can use PHP code in-with the template class?

 

any help would be much appreciated.

 

Mo

Link to comment
https://forums.phpfreaks.com/topic/55410-solved-zigmoyd-problem-anyhelp/
Share on other sites

Imagine this structure:

ROOT/
  tree/
    branch1/
    branch2/

 

If you're in "branch2" and wanted to go to "branch1" you'd use "../branch1"

If you're in "branch2" and wanted to go to the root you could use "../.." or "/" (/ means root directory)

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.