【问题标题】:Error Fatal error: Call to undefined function ssh2_connect() in (Env: PHP Version 5.6.6, Windows7 and IIS7)错误致命错误:在(环境:PHP 版本 5.6.6、Windows7 和 IIS7)中调用未定义函数 ssh2_connect()
【发布时间】:2015-05-25 09:50:58
【问题描述】:

我无法使用 ss2_connect()。我已将所有 libssh2.dll 和 php_ssh2.dll 复制到 php\ext 文件夹,也未注释 extension=php_ssh2.dll。

但出现错误致命错误:从下面的代码在第 2 行的 C:\PHP\Code\linux.php 中调用未定义的函数 ssh2_connect()。请帮帮我。

【问题讨论】:

  • “代码下方”在哪里?
  • checklogin.php contents ::: Linux.php 内容::::
  • 请回复对我有帮助的。
  • 1.记录:请不要将您的代码作为答案,而是将它们放入您的代码中。 2. 请注意stackoverflow.com/questions/14050231/…上的cmets,类似的问题:请看一下那里的cmets,让人们帮助你。

标签: php windows iis-7


【解决方案1】:

checklogin.php  contents ::: 

<?php

// username and password sent from form
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
$result1=$myusername.$mypassword;
$result='rsahursahu';
if($result==$result1){
//header("location:emp.php");
header("location:linux.php");
//header("location:file_execute.php");
}
else {
echo "Wrong Username or Password";
}
?>


Linux.php contents::::

<?php
$connection = ssh2_connect('111.111.111.4', 22);
ssh2_auth_password($connection, 'oracle', 'oracle');
$stream = ssh2_exec($connection, 'ls');
?>

【讨论】:

  • 您的解决方案到底是什么?您发布了一些代码,绝对没有评论如何处理它
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-21
  • 2016-02-20
  • 2014-07-21
  • 2016-07-02
相关资源
最近更新 更多