我正在使用PhpStorm和PHP新手。
我正在使用Xdebug,MAMP Bitnami服务器。
似乎进入PHP对象构造函数的步骤无效。
以下是我的代码:
<html>
<body>
Welcome <?php echo $_POST["username"]; ?><br>
Your server url is: <?php echo $_POST["server"]; ?>
<?php
echo "Before connecting";
try {
require_once ('cmis_repository_wrapper.php');
$serverurl = $_POST["server"];
$username = $_POST["username"];
$password = $_POST["password"];
$client = new CMISService($serverurl, $username, $password);
echo "Connected\n";
}
catch(Exception $e){
echo "Message: " .$e->getMessage();
}
?>
</body>
我无法进入CMISService
对象的构造函数。我可以进入require_once
方法,但是。
以下是CMISService构造方法的代码:
function __construct($url, $username, $password, $options = null, array $addlCurlOptions = array ()) {
parent :: __construct($url, $username, $password, $options, $addlCurlOptions);
$this->_link_cache = array ();
$this->_title_cache = array ();
$this->_objTypeId_cache = array ();
$this->_type_cache = array ();
$this->_changeToken_cache = array ();
}
答案 0 :(得分:0)
似乎我没有在我的代码中包含我的cmis_service类,这就是为什么它显然不起作用。
归咎于我幼稚的PHP知识:(
以下是更新的代码及其工作
[
{
"stationname": "Radio Plus, Mauritius",
"websiteurl": "www.radioplus.mu",
"streamurl": "http://s4.voscast.com:8432/;",
"genre":"POP (Popular Music)",
"language":"French",
"country": "Mauritius",
"description":"Best Music"
},
{
"stationname": "Radio One",
"websiteurl": "r1.mu",
"streamurl": "http://151.80.44.127:8020/stream?type=http&nocache",
"genre":"POP (Popular Music)",
"language":"French",
"country": "Mauritius",
"description":"24/7 Music Everyday"
},
{
"stationname": "2RRR FM",
"websiteurl": "www.2rrr.org",
"streamurl": "http://110.142.218.7:88/broadwave.m3u?type=.mp3/;s",
"genre":"Electronic",
"language":"English",
"country": "Austria",
"description":"Good Music all day and night"
},
{
"stationname": "22G Radio",
"websiteurl": "www.22gradio.com",
"streamurl": "http://s6.voscast.com:9224/;stream.mp3",
"genre":"Electronic",
"language":"English",
"country": "India",
"description":"Good Music in India"
},
{
"stationname": "80’s / 90’s Radio",
"websiteurl": "hitconnection.fr",
"streamurl": "http://streaming.radionomy.com/80-s-90-s-HitConnectionRadio",
"genre":"Electronic",
"language":"French",
"country": "French",
"description":"This online radio station provides twenty four hour (24h) mix of 80’s / 90’s of music. The station plays all the 80’s / 90’s music you love while striving to keep up with the desires of its listeners."
},
{
"stationname": "FM Reggae Trade Radio",
"websiteurl": "www.1.fm",
"streamurl": "http://sc1c-sjc.1.fm:7078/;",
"genre":"Raggae",
"language":"Other",
"country": "Brazil",
"description":"Entertainment, Fun and excitement are the specialty of 1.FM Reggae Trade Radio the radio is always live and lively with its energetic presentation, promotion of music and programs. Its a complete package as a full entertainment rich radio broadcasting from Brazil With 1.FM Reggae Trade Radio you can enjoy lots of class leading musical programs."
},
{
"stationname": "01 Internet of Music",
"websiteurl": "www.internetofmusic.com",
"streamurl": "http://radio.internetofmusic.com:8000/live.nsv",
"genre":"World Music / Beats",
"language":"English",
"country": "United States of America",
"description":"01 Internet of Music is all about good music as they believes “Music in the Answer”. By tuning in to 01 Internet of Music listeners from around the world can enjoy the amazingly entertaining musical programs presented by the talented broadcasting team of 01 Internet of Music."
},
{
"stationname": "I love Kpop",
"websiteurl": "www.ilovekpop.wifeo.com",
"streamurl": "http://streaming.radionomy.com/IloveKpop?type=.mp3",
"genre":"R&B / Soul",
"language":"English",
"country": "Korea North",
"description":"In Korea there are lots of pop music based radio station available through out the whole country and I love Kpop is one of those popular radios broadcasting live from there. Unlike other radio stations of Korea this radio is always known best for broadcasting pop music along with musical information."
},
{
"stationname": "2cr Radio",
"websiteurl": "www.2cr.com.au",
"streamurl": "http://s6.voscast.com:8016/;",
"genre":"Pop (Popular music)",
"language":"Japanese",
"country": "China",
"description":"2cr Radio is a very popular radio on China. They play Chines music, it is a 24 hrs online radio. Enjoy 2cr Radio."
},
{
"stationname": "Akash",
"websiteurl": "www.2cr.com.au",
"streamurl": "http://s6.voscast.com:8016/;",
"genre":"Pop (Popular music)",
"language":"Japanese",
"country": "China",
"description":"2cr Radio is a very popular radio on China. They play Chines music, it is a 24 hrs online radio. Enjoy 2cr Radio."
}
]