Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
Details
Activity
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
chenchuanwen
my-yaf-project
Commits
0f67e609
Commit
0f67e609
authored
Oct 08, 2018
by
chenchuanwen
Browse files
Options
Browse Files
Download
Plain Diff
conflict
parents
bf28104b
22284e14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
541 additions
and
5 deletions
+541
-5
Index.php
application/controllers/Index.php
+3
-1
Abstract.php
application/library/Our/Controller/Abstract.php
+1
-1
MongoDb.php
application/models/Mongo/MongoDb.php
+530
-0
application.ini
conf/application.ini
+2
-0
index.php
public/index.php
+1
-0
jpush.log
public/jpush.log
+2
-0
test.php
public/test.php
+2
-3
No files found.
application/controllers/Index.php
View file @
0f67e609
...
@@ -54,7 +54,9 @@ class IndexController extends \Our\Controller_Abstract {
...
@@ -54,7 +54,9 @@ class IndexController extends \Our\Controller_Abstract {
public
function
indexAction
()
{
public
function
indexAction
()
{
// $clientPush=\JPush\ClientPush::getInstance();
// $clientPush=\JPush\ClientPush::getInstance();
// $clientPush->pushAll();
// $clientPush->pushAll();
echo
'success'
;
$mongoDb
=
new
\Mongo\MongoDbModel
();
$res
=
$mongoDb
->
insert
(
'message_history'
,
array
(
'id'
=>
1
,
'name'
=>
'chenchuanwen'
));
echo
json_encode
(
$res
);
exit
;
exit
;
\Our\Log
::
getInstance
()
->
write
(
'testLog|||||testLog'
);
\Our\Log
::
getInstance
()
->
write
(
'testLog|||||testLog'
);
var_dump
(
$_SERVER
);
exit
;
var_dump
(
$_SERVER
);
exit
;
...
...
application/library/Our/Controller/Abstract.php
View file @
0f67e609
...
@@ -36,7 +36,7 @@ abstract class Controller_Abstract extends \Yaf\Controller_Abstract {
...
@@ -36,7 +36,7 @@ abstract class Controller_Abstract extends \Yaf\Controller_Abstract {
$data
[
'responseContent'
]
=
$returnMessage
[
'responseContent'
];
$data
[
'responseContent'
]
=
$returnMessage
[
'responseContent'
];
$data
[
'data'
]
=
array
();
$data
[
'data'
]
=
array
();
$data
[
'data'
]
=
$this
->
req
[
NameConst
::
data
];
$data
[
'data'
]
=
$this
->
req
[
NameConst
::
data
];
if
(
APP_ENV
==
'test'
){
if
(
APP_ENV
==
'test'
||
APP_ENV
==
'pre'
){
$log
=
\Our\Log
::
getInstance
();
$log
=
\Our\Log
::
getInstance
();
$log
->
write
(
json_encode
(
$data
));
$log
->
write
(
json_encode
(
$data
));
}
}
...
...
application/models/Mongo/MongoDb.php
0 → 100644
View file @
0f67e609
This diff is collapsed.
Click to expand it.
conf/application.ini
View file @
0f67e609
...
@@ -49,6 +49,8 @@ push.clientHost="wss://api.shenbd.com/wss"
...
@@ -49,6 +49,8 @@ push.clientHost="wss://api.shenbd.com/wss"
push.host
=
"172.16.142.15"
push.host
=
"172.16.142.15"
push.port
=
"9503"
push.port
=
"9503"
push.open
=
1
push.open
=
1
push.user.service.id
=
293
push.user.service.type
=
7
;
;
elastic.master.host
=
"172.16.142.15"
elastic.master.host
=
"172.16.142.15"
elastic.master.port
=
"9200"
elastic.master.port
=
"9200"
...
...
public/index.php
View file @
0f67e609
...
@@ -15,5 +15,6 @@ if(APP_ENV=='test' || APP_ENV=='pre' ||APP_ENV=='ccwdevelop' || APP_ENV=='produc
...
@@ -15,5 +15,6 @@ if(APP_ENV=='test' || APP_ENV=='pre' ||APP_ENV=='ccwdevelop' || APP_ENV=='produc
error_reporting
(
0
);
error_reporting
(
0
);
}
}
}
}
error_reporting
(
E_ALL
);
$app
=
new
\Yaf\Application
(
APPLICATION_PATH
.
"/conf/application.ini"
,
APP_ENV
);
$app
=
new
\Yaf\Application
(
APPLICATION_PATH
.
"/conf/application.ini"
,
APP_ENV
);
$app
->
bootstrap
()
->
run
();
$app
->
bootstrap
()
->
run
();
public/jpush.log
0 → 100644
View file @
0f67e609
Send POST https://api.jpush.cn/v3/push, body:{"platform":"all","audience":"all","notification":{"alert":"Hi, JPush"},"options":{"sendno":1913510038,"apns_production":false}}, times:1
Send POST https://api.jpush.cn/v3/push, body:{"platform":"all","audience":"all","notification":{"alert":"Hi, JPush"},"options":{"sendno":93988000,"apns_production":false}}, times:1
public/test.php
View file @
0f67e609
<?php
<?php
phpinfo
();
exit
;
echo
22
;
exit
;
echo
444
;
exit
;
$redis
=
new
Redis
();
$redis
=
new
Redis
();
$redis
->
connect
(
'127.0.0.1'
,
'6379'
);
$redis
->
connect
(
'127.0.0.1'
,
'6379'
);
$redis
->
rPush
(
'test'
,
0
);
$redis
->
rPush
(
'test'
,
0
);
...
...
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