PC/SC with PHP5 in windows with wampServer


PC/SC with PHP5 in windows with wampServer

我正在尝试从智能卡读取公共数据与wampServer, PHP 5.4, winSCard和php_pcsc.dll PHP5 (http://pecl.php.net/package/pcsc/0.2/windows)。

我发现这个项目http://hanez.org/pcsc-for-php.html(代码是php4,但我的dll是php5),并试图做在本地主机,但php抛出我这个错误"调用未定义的函数SCardListReaders()"。

当我看到de phpinfo我可以看到扩展启用,但它没有任何信息(我不能放图像,因为我没有点),只有表头

      PC/SC

| PC/SC支持| enabled |


谢谢

你可能会得到一个错误,因为这个函数实际上是scard_list_readers()而不是SCardListReaders()在你的帖子中显示的错误。

但是在您可以使用大多数函数之前,您需要首先建立一个上下文。

试题:

$context = scard_establish_context();
$readers = scard_list_readers($context);
print_r($readers);
// then when you have your card reader's identity from $readers
$connection = scard_connect($context, 'YOUR CARD READER HERE');
$response   =  scard_transmit($connection, 'pdu string');