Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2_33cn
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
_site-res
yii2_33cn
Commits
714a4cdd
Commit
714a4cdd
authored
Jul 30, 2018
by
tufengqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
238624b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
FzmMns.php
vendor/yiisoft/yii2-mns/FzmMns.php
+4
-7
No files found.
vendor/yiisoft/yii2-mns/FzmMns.php
View file @
714a4cdd
...
@@ -2,13 +2,10 @@
...
@@ -2,13 +2,10 @@
namespace
yii\mns
;
namespace
yii\mns
;
require_once
(
'AmqpLib/autoload.php'
);
use
PhpAmqpLib\Message\AMQPMessage
;
use
PhpAmqpLib\Message\AMQPMessage
;
use
PhpAmqpLib\Connection\AMQPStreamConnection
;
use
PhpAmqpLib\Connection\AMQPStreamConnection
;
use
PhpAmqpLib\Wire\AMQPTable
;
use
PhpAmqpLib\Wire\AMQPTable
;
class
FzmMns
extends
\yii\base\Component
class
FzmMns
extends
\yii\base\Component
{
{
...
@@ -452,8 +449,8 @@ class FzmMns extends \yii\base\Component
...
@@ -452,8 +449,8 @@ class FzmMns extends \yii\base\Component
$curl
=
curl_init
();
$curl
=
curl_init
();
curl_setopt
(
$curl
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$curl
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$curl
,
CURLOPT_RETURNTRANSFER
,
1
);
curl_setopt
(
$curl
,
CURLOPT_RETURNTRANSFER
,
1
);
curl_setopt
(
$curl
,
CURLOPT_SSL_VERIFYPEER
,
FALSE
);
curl_setopt
(
$curl
,
CURLOPT_SSL_VERIFYPEER
,
false
);
curl_setopt
(
$curl
,
CURLOPT_SSL_VERIFYHOST
,
FALSE
);
curl_setopt
(
$curl
,
CURLOPT_SSL_VERIFYHOST
,
false
);
$header
[]
=
"Content-Type:application/json;charset=utf-8"
;
$header
[]
=
"Content-Type:application/json;charset=utf-8"
;
if
(
!
empty
(
$header
))
{
if
(
!
empty
(
$header
))
{
curl_setopt
(
$curl
,
CURLOPT_HTTPHEADER
,
$header
);
curl_setopt
(
$curl
,
CURLOPT_HTTPHEADER
,
$header
);
...
@@ -461,7 +458,7 @@ class FzmMns extends \yii\base\Component
...
@@ -461,7 +458,7 @@ class FzmMns extends \yii\base\Component
$timeout
=
30
;
$timeout
=
30
;
curl_setopt
(
$curl
,
CURLOPT_CONNECTTIMEOUT
,
$timeout
);
curl_setopt
(
$curl
,
CURLOPT_CONNECTTIMEOUT
,
$timeout
);
switch
(
$method
)
{
switch
(
$method
)
{
case
"GET"
:
case
"GET"
:
curl_setopt
(
$curl
,
CURLOPT_HTTPGET
,
true
);
curl_setopt
(
$curl
,
CURLOPT_HTTPGET
,
true
);
break
;
break
;
case
"POST"
:
case
"POST"
:
...
@@ -471,7 +468,7 @@ class FzmMns extends \yii\base\Component
...
@@ -471,7 +468,7 @@ class FzmMns extends \yii\base\Component
curl_setopt
(
$curl
,
CURLOPT_CUSTOMREQUEST
,
"POST"
);
curl_setopt
(
$curl
,
CURLOPT_CUSTOMREQUEST
,
"POST"
);
curl_setopt
(
$curl
,
CURLOPT_POSTFIELDS
,
$params
);
curl_setopt
(
$curl
,
CURLOPT_POSTFIELDS
,
$params
);
break
;
break
;
case
"PUT"
:
case
"PUT"
:
curl_setopt
(
$curl
,
CURLOPT_CUSTOMREQUEST
,
"PUT"
);
curl_setopt
(
$curl
,
CURLOPT_CUSTOMREQUEST
,
"PUT"
);
curl_setopt
(
$curl
,
CURLOPT_POSTFIELDS
,
json_encode
(
$params
,
320
));
curl_setopt
(
$curl
,
CURLOPT_POSTFIELDS
,
json_encode
(
$params
,
320
));
break
;
break
;
...
...
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