I am using PhpStorm and new to PHP.
I am using Xdebug, MAMP Bitnami server.
It seems the step into a PHP object constructor is not working.
Below is my code:
<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>
I am not able to step into the CMISService
object's constructor. I am able to step into require_once
method but.
Below is the code for CMISService's construct method:
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 ();
}
It seems i had not included my cmis_service class in my code, that's why obivously it was not working.
Blame it on my naive php knowledge :(
Below is the updated code and its working
<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');
require_once ('cmis_service.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>
</html>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.