Other PHP files in Typecho open under Theme file

Source: Internet
Author: User

My question is probably this ...

In the Typecho, make the theme, just do some PHP files and put into/usr/themes/This folder can be used, when the site opens, the domain name will be displayed directly under the server file (for example: https://localhost/... Instead of https://localhost/usr/themes/... The PHP file is now dynamic.
However, if you make a file that is not under the Typecho topic support scope but uses the Typecho dynamic function, but cannot open in Typecho ...

, here is my file directory:

This, in addition to HTML files, copyright.php and searchname.php files are not supported by Typecho, but these files need to Typecho dynamic features.

, this is the file code for searchname.php:

However, when opened in a browser, it is not possible to open this file:

This is not possible:

In the F12 tool, no code is shown here. If the F12 of IE is true, the prompt cannot open the file.

However, you can open an HTML file of the same directory:

My question is:
Why can't I open a php file under the theme file? Instead of changing the PHP file to HTML, you can open the ... However, it is not possible to use Typecho dynamic features ...
If Typecho cannot open such a php file, then what can I do to make this file use the search function?

Well, the problem description may be a little messy, I am very grateful for your help!

Reply content:

My question is probably this ...

In the Typecho, make the theme, just do some PHP files and put into/usr/themes/This folder can be used, when the site opens, the domain name will be displayed directly under the server file (for example: https://localhost/... Instead of https://localhost/usr/themes/... The PHP file is now dynamic.
However, if you make a file that is not under the Typecho topic support scope but uses the Typecho dynamic function, but cannot open in Typecho ...

, here is my file directory:

This, in addition to HTML files, copyright.php and searchname.php files are not supported by Typecho, but these files need to Typecho dynamic features.

, this is the file code for searchname.php:

However, when opened in a browser, it is not possible to open this file:

This is not possible:

In the F12 tool, no code is shown here. If the F12 of IE is true, the prompt cannot open the file.

However, you can open an HTML file of the same directory:

My question is:
Why can't I open a php file under the theme file? Instead of changing the PHP file to HTML, you can open the ... However, it is not possible to use Typecho dynamic features ...
If Typecho cannot open such a php file, then what can I do to make this file use the search function?

Well, the problem description may be a little messy, I am very grateful for your help!

The custom template is ok.
Change the header of the page to this paragraph:


  
   need('header.php'); ?>

PAGENAME: the name of the page can be customized
$this->need('header.php'):If you don't share the head, you can change the header.

When you're done, go back to the back office, manage-stand-alone pages, then add, and choose a custom template.

The question asked, but also a little drunk ... I think you need to customize the page template feature, follow the document's instructions to write the template's comment header, you can select a template when creating a new page, you can customize the content can also access to the Typecho dynamic features.

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