Phpcms URL Rules (Channel page (column list page) level two domain name, content page main domain name) ____php

Source: Internet
Author: User
Tags rtrim

/phpcms/modules/content/content.php Add method and edit method are responsible for adding and modifying the article

This method invokes the/phpcms/model/content_model.class.php add_content and edit_content to implement the added modification of the article

Update URL Address

if ($data [' Islink ']==1) {

$urls [0]= trim_script ($_post[' Linkurl ']);

} else {

$urls = $this->url->show ($id, 0, $systeminfo [' catid '], $systeminfo [' Inputtime '], $data [' prefix '], $inputinfo, ' Add ');

}

Called the Show method in the url.class.php in phpcms/modules/content/classes/to generate the path

if ($content _ishtml&& $url) {

$url _arr[1] Returns the actual path generated in the system

$url _arr[1] = $html _root. ' /'. $urls;

$url _arr[1] Returns the path that is saved in the database with the domain name

$url _arr[0] = Web_path = = '/' $match _url. $html _root. ' /'. $urls: $match _url.rtrim (Web_path, '/'). $html _root. ' /'. $urls;

if (Strpos ($url _arr[0], ' ent ') >0) {

$url _arr[1]= '/ent '. $url _arr[1];

       }

echo $url _arr[1];

$url _arr[0]=str_replace ("Http://fashion", "http://www", $url _arr[0]);

}

ElseIf ($content _ishtml) {

$url _arr[0] = Web_path = = '/' $html _root. ' /'. $urls: RTrim (Web_path, '/'). $html _root. ' /'. $urls;

$url _arr[1] = $html _root. ' /'. $urls;

} else {

$url _arr[0] = $url _arr[1] =app_path. $urls;

}

if ($content _ishtml&& $url) {

if ($domain _dir && $category [' Isdomain ']) {

$url _arr[1] = $html _root. ' /'. $domain _dir. $urls;

$url _arr[0] = $url. $urls;

} else {

$url _arr[1] = $html _root. ' /'. $urls;

$url _arr[0] = Web_path = = '/' $match _url. $html _root. ' /'. $urls: $match _url.rtrim (Web_path, '/'). $html _root. ' /'. $urls;

}

}

ElseIf ($content _ishtml) {

$url _arr[0] = Web_path = = '/' $html _root. ' /'. $urls: RTrim (Web_path, '/'). $html _root. ' /'. $urls;

$url _arr[1] = $html _root. ' /'. $urls;

} else {

$url _arr[0] = $url _arr[1] =app_path. $urls;

}

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.