简体   繁体   English

使用SimpleTest登录连接问题

[英]login connection problem using SimpleTest

I am using SimpleBrowser from SimpleTest ( http://www.simpletest.org ) to login a webmin ( http://www.webmin.com/ ). 我正在使用SimpleTest( http://www.simpletest.org )的SimpleBrowser登录Webmin( http://www.webmin.com/ )。 This login uses https. 此登录使用https。 I've tried two different ways, both fail. 我尝试了两种不同的方法,都失败了。

$browser = new SimpleBrowser();
$browser->useCookies();
$browser->useFrames();
//echoes the login page, where it should echo the landing page from a logged user
echo $browser->post('https://address/','user=User&pass=Secret'));

And also : 并且 :

$browser = new SimpleBrowser();
$browser->useCookies();
$browser->useFrames();
$browser->get('https://address/');
$browser->setField('user', 'User');
$browser->setField('pass', 'Secret');
//echoes the login page, where it should echo the landing page from a logged user
echo $browser->clickSubmit('Login');

Do you have any clue why it doesn't work ? 您有什么线索为什么不起作用?

确保您是否在PHP中安装了php_openssl.dll扩展名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM