35 lines
1.2 KiB
PHP
Executable File
35 lines
1.2 KiB
PHP
Executable File
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
|
// +----------------------------------------------------------------------
|
|
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
|
// +----------------------------------------------------------------------
|
|
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
|
// +----------------------------------------------------------------------
|
|
// | Author: liu21st <liu21st@gmail.com>
|
|
// +----------------------------------------------------------------------
|
|
use think\facade\Route;
|
|
|
|
Route::get('think', function () {
|
|
// $absolutePath = realpath('./public/img_poster.jpg');
|
|
$currentDir = getcwd();
|
|
$absolutePath = $currentDir . '/public/img_poster.jpg';
|
|
return $absolutePath;
|
|
});
|
|
|
|
Route::get('hello/:name', 'index/hello');
|
|
Route::get('baji', function () {
|
|
// return 'hello';
|
|
// return view('baji');
|
|
$wxServer = new \app\common\server\Wx($this->app);
|
|
$user_base = $wxServer->generateUrlLink();
|
|
header("Location: " . $user_base);
|
|
exit();
|
|
});
|
|
|
|
Route::get('baji1', function () {
|
|
// return 'hello';
|
|
return view('baji');
|
|
});
|
|
|
|
|