Site Directory Absolute Path

Source: Internet
Author: User
$smarty->assign('ROOT_PATH',ROOT_PATH);$smarty->assign('ADMIN',ADMIN_PATH);
 
  
  
   
 
  

How should I write the path here? Because you might want to use URL rewriting later without relative path

Reply content:

$smarty->assign('ROOT_PATH',ROOT_PATH);$smarty->assign('ADMIN',ADMIN_PATH);

How should I write the path here? Because you might want to use URL rewriting later without relative path

You this is the WWW root directory is the physical path, you must modify the path for HTTP access only line
For example:./admin/do.php?act=login

The URL root of the Web page is based on the root directory of the current site, so in the browser is not able to access the file outside the directory, so you can not directly use D: This file absolute path as a URL.
If you configure the domain name, your site root directory is D:/phpStudy/www/blog1 , then the URL is: (域名)/admin/do.php?act=login .
If you do not configure the domain name, your site root directory is D:/phpStudy/www , then the URL is: localhost/blog1/admin/do.php?act=login .

  • 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.