thinkphp Source parsing Version 31-1

Source: Internet
Author: User
Thinkphp Source Code parsing (Version 3.1)-1

index.php

    1. Defining Path Constants
    2. Add-on Runtime directory

runtime.php


    1. Check the PHP version
      if(version_compare(PHP_VERSION,'5.2.0','<')) die('require PHP > 5.2.0 !');
    2. System Information
      define('IS_CGI',substr(PHP_SAPI, 0,3)=='cgi' ? 1 : 0 );
      define('IS_WIN',strstr(PHP_OS, 'WIN') ? 1 : 0 );

$_server[' Php_self ') represents the location address of the current PHP file relative to the root of the Web site, and is related to document root.

$url = "http://"$_server[' http_host '].$_server[' php_self ') can be used to represent the current URL;

  • Define Path
    defined('CORE_PATH') or define('CORE_PATH', THINK_PATH.'Lib/');

  • Run-Time Files
    • load_runtime_file()

      Load common function library, core control class, exception handling class, Behavior extension class, here with array traversal load, can try.
      Check cache directory, debug mode to delete the compiled cache:
      if(is_file(RUNTIME_FILE)) unlink(RUNTIME_FILE);

    • check_runtime()
    • build_runtime_cache()
  • Create a project directory structure
    • Build_app_dir ()
  • Executive Portal
    Think::Start();
  • '). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
  • '). Text (i)); }; $numbering. FadeIn (1700); }); });

    The above describes the thinkphp source code parsing Version 31-1, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

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