About the relative path of the parent directory to the upper parent directory

Source: Internet
Author: User

{% include ': /.. /partials/main_nav.php "%}

Always remember to find a file with a relative path first to find its parent node, the parent node found, in a slash is the specified subdirectory, then down the line, so the use of relative path to find the file is

The first step:.. /(one that represents the parent node of this directory, which is the ancestor directory), to find the minimum parent node to use

The second step:/Sub-folder down to find the required files

You can see first to find the top-level Father folder: app, which is passed. /.. /implemented, so now: app=. /.. /; now know the top father, the sub-file should be very easy to find,

Need to note here Template.volt this file and Train folder is a side-by-side relationship, train folder point open and sub-file, so do not see the mistake, do not think of Template.volt as a sub-file train

Add: If it is a Web site development: Generally write absolute path, because, different files into the template file, if you do a relative path, different files introduced, the relative path is not the same

/indicates that the root directory is the DocumentRoot directory, the current directory directly write file names such as: a.php is the current directory of a.php, and/a.php means documentroot under the a.php is also equivalent to the domain name/a.php such as:/a.php= www.sina.com/a.php

About the relative path of the parent directory to the upper parent directory

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.