首页教程是php start.php start -d,可是我的/usr/local/php7/bin里面只有php-cgi、php-config、phpdbg、phpsize四个文件, 根本就没有php,我直接用/usr/local/php7/bin/php-cgi start.php start -d启动返回
X-Powered-By: PHP/7.1.4
Content-type: text/html; charset=UTF-8
only run in command line mode
照着demo写的这个一在浏览器打开就是false
<?php
$to_uid = "";
$push_api_url = "http://127.0.0.1:2121/";
$post_data = array(
"type" => "publish",
"content" => "这个是推送的测试数据",
"to" => $to_uid,
);
$ch = curl_init ();
curl_setopt ( $ch, CURLOPT_URL, $push_api_url );
curl_setopt ( $ch, CURLOPT_POST, 1 );
curl_setopt ( $ch, CURLOPT_HEADER, 0 );
curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt ( $ch, CURLOPT_POSTFIELDS, $post_data );
curl_setopt ($ch, CURLOPT_HTTPHEADER, array("Expect:"));
$return = curl_exec ( $ch );
curl_close ( $ch );
var_export($return);
求教大佬应该怎么办。。。
参照手册装php-cli