-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathfunc.php
More file actions
29 lines (26 loc) · 659 Bytes
/
func.php
File metadata and controls
29 lines (26 loc) · 659 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
* 业务方法类,此类用来放置需要执行的方法函数
* 方法return false,表示通知消息消费失败,重新回到队列执行
*
* @author: liukelin 314566990@qq.com
*/
function helloWorld($a){
print_r("helloWorld:{$a}\r\n");
}
//普通函数形式
function test($a,$b){
$myfile = fopen("testfile.txt", "a+");
fwrite($myfile, date('Y-m-d H:i:s').",test,{$a}=={$b}\r\n");
fclose($myfile);
return true;
}
//可以为类形式
class test{
public function test($a, $b){
$myfile = fopen("testfile.txt", "a+");
fwrite($myfile, date('Y-m-d H:i:s').",test.test,{$a}=={$b}\r\n");
fclose($myfile);
return true;
}
}