Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projecttwo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangtao
projecttwo
Commits
44b3818e
Commit
44b3818e
authored
Jun 24, 2025
by
wangzhengwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sms code
parent
5c5ad100
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
Sms.php
app/api/controller/Sms.php
+2
-2
log.php
config/log.php
+10
-2
No files found.
app/api/controller/Sms.php
View file @
44b3818e
...
...
@@ -24,9 +24,9 @@ class Sms extends BaseController
$data
=
$request
->
param
();
$code
=
str_pad
(
random_int
(
0
,
999999
),
6
,
'0'
,
STR_PAD_LEFT
);
// $code = str_pad(random_int(0, 999999), 6, '0', STR_PAD_LEFT);
$code
=
random_int
(
100000
,
999999
);
// halt($code);
$SMS
=
new
SendSms
();
$res
=
$SMS
->
aliyun_send
(
$data
[
'mobile'
],
$code
);
...
...
config/log.php
View file @
44b3818e
...
...
@@ -42,17 +42,25 @@ return [
'payment_task'
=>
[
'type'
=>
'file'
,
'path'
=>
runtime_path
(
'log'
)
.
'payment_task/'
,
// 独立目录
'single'
=>
tru
e
,
// 单个文件(否则按日期分割)
'single'
=>
fals
e
,
// 单个文件(否则按日期分割)
'file_name'
=>
'task.log'
,
// 固定文件名
'level'
=>
[
'info'
,
'error'
],
// 只记录 info 和 error
// 日志输出格式化
'format'
=>
'[%s][%s] %s'
,
// 是否实时写入
'realtime_write'
=>
false
,
],
//
'project_task'
=>
[
'type'
=>
'file'
,
'path'
=>
runtime_path
(
'log'
)
.
'project_task/'
,
// 独立目录
'single'
=>
tru
e
,
// 单个文件(否则按日期分割)
'single'
=>
fals
e
,
// 单个文件(否则按日期分割)
'file_name'
=>
'task.log'
,
// 固定文件名
'level'
=>
[
'info'
,
'error'
],
// 只记录 info 和 error
// 日志输出格式化
'format'
=>
'[%s][%s] %s'
,
// 是否实时写入
'realtime_write'
=>
false
,
],
],
];
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment