PHP code example of guoguo882010 / thinkphp

1. Go to this page and download the library: Download guoguo882010/thinkphp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

guoguo882010 / thinkphp example snippets


composer 


use RSHDSDK\ThinkPHP\ThinkPHP;

//获取 tp 版本号,例:5.1.42
ThinkPHP::getThinkPHPVersion();

//获取 tp 根目录路径,
//linux返回:/www/tp5 (结尾没有/符号)
//windows返回:D:\www\tp5
ThinkPHP::getThinkPHPRootPath();

//tp 是否安装 true 安装 false 没安装
ThinkPHP::isThinkPHPInstalled();