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
5b1e3deb
Commit
5b1e3deb
authored
Sep 27, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mongodb
parent
84222db2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
538 additions
and
3 deletions
+538
-3
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
test.php
public/test.php
+1
-1
No files found.
application/controllers/Index.php
View file @
5b1e3deb
...
...
@@ -54,7 +54,9 @@ class IndexController extends \Our\Controller_Abstract {
public
function
indexAction
()
{
// $clientPush=\JPush\ClientPush::getInstance();
// $clientPush->pushAll();
echo
'success'
;
$mongoDb
=
new
\Mongo\MongoDbModel
();
$res
=
$mongoDb
->
insert
(
'message_history'
,
array
(
'id'
=>
1
,
'name'
=>
'chenchuanwen'
));
echo
json_encode
(
$res
);
exit
;
\Our\Log
::
getInstance
()
->
write
(
'testLog|||||testLog'
);
var_dump
(
$_SERVER
);
exit
;
...
...
application/library/Our/Controller/Abstract.php
View file @
5b1e3deb
...
...
@@ -36,7 +36,7 @@ abstract class Controller_Abstract extends \Yaf\Controller_Abstract {
$data
[
'responseContent'
]
=
$returnMessage
[
'responseContent'
];
$data
[
'data'
]
=
array
();
$data
[
'data'
]
=
$this
->
req
[
NameConst
::
data
];
if
(
APP_ENV
==
'test'
){
if
(
APP_ENV
==
'test'
||
APP_ENV
==
'pre'
){
$log
=
\Our\Log
::
getInstance
();
$log
->
write
(
json_encode
(
$data
));
}
...
...
application/models/Mongo/MongoDb.php
0 → 100644
View file @
5b1e3deb
This diff is collapsed.
Click to expand it.
conf/application.ini
View file @
5b1e3deb
...
...
@@ -49,6 +49,8 @@ push.clientHost="wss://api.shenbd.com/wss"
push.host
=
"172.16.142.15"
push.port
=
"9503"
push.open
=
1
push.user.service.id
=
293
push.user.service.type
=
7
;
elastic.master.host
=
"172.16.142.15"
elastic.master.port
=
"9200"
...
...
public/index.php
View file @
5b1e3deb
...
...
@@ -15,5 +15,6 @@ if(APP_ENV=='test' || APP_ENV=='pre' ||APP_ENV=='ccwdevelop'){
error_reporting
(
0
);
}
}
error_reporting
(
E_ALL
);
$app
=
new
\Yaf\Application
(
APPLICATION_PATH
.
"/conf/application.ini"
,
APP_ENV
);
$app
->
bootstrap
()
->
run
();
public/test.php
View file @
5b1e3deb
<?php
echo
1
;
exit
;
echo
2
;
exit
;
$redis
=
new
Redis
();
$redis
->
connect
(
'127.0.0.1'
,
'6379'
);
$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