提交代码
This commit is contained in:
parent
077db2ef8e
commit
6a59eda4b3
|
|
@ -155,7 +155,11 @@ class Index extends Base
|
|||
$wxServer = new \app\common\server\Wx($this->app);
|
||||
$user_base = $wxServer->generateUrlLinks($userId);
|
||||
$autoload = new \app\common\server\autoload();
|
||||
$imageData = $autoload->generatePosterWithQR('public/img_poster.jpg', $user_base);
|
||||
$currentDir = getcwd();
|
||||
// $absolutePath = $currentDir . '/public/img_poster.jpg';
|
||||
// ///www/wwwroot/testbaji.onelight.vip/app/public/img_poster.jpg
|
||||
// //www/wwwroot/testbaji.onelight.vip/public/public/img_poster.jpg
|
||||
$imageData = $autoload->generatePosterWithQR( $currentDir . '/img_poster.jpg', $user_base);
|
||||
if ($imageData) {
|
||||
header('Content-Type: image/png');
|
||||
header('Content-Length: ' . strlen($imageData)); // 设置图像长度,帮助浏览器处理流式内容
|
||||
|
|
|
|||
|
|
@ -11,7 +11,10 @@
|
|||
use think\facade\Route;
|
||||
|
||||
Route::get('think', function () {
|
||||
return 'hello,ThinkPHP6!';
|
||||
// $absolutePath = realpath('./public/img_poster.jpg');
|
||||
$currentDir = getcwd();
|
||||
$absolutePath = $currentDir . '/public/img_poster.jpg';
|
||||
return $absolutePath;
|
||||
});
|
||||
|
||||
Route::get('hello/:name', 'index/hello');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user