我疯了很多研究找到了php7的dbase dll而且我找不到它。
有人找到了吗?或者你知道是否有办法从旧版本重建dbase.dll来创建一个新版本。
def check_hand(_hand_):
last_c = ''
straight = 0
# This is illustrative, you can use this to return
# the greatest hand one could have
for card_value, number_of_occurences in _hand_.iteritems():
if number_of_occurences == 2:
print("We have a 2 of a kind")
elif number_of_occurences == 3:
print("We have a 3 of a kind")
elif number_of_occurences == 4:
print("We have a 4 of a kind")
if last_c == '':
last_c = card_value
else:
if card_value - last_c == 1:
straight += 1
last_c = card_value
if straight >= 4:
print("we have a straight")
a = [1, 3, 4, 2, 5, 8, 1]
b = [2, 2, 4, 7, 10]
c = [5, 6, 5, 5, 5]
# nifty way of assigning a dictionary with how many
# occurrences of a number in a list, and sorting it
check = {
'a': dict((i, a.count(i)) for i in sorted(a)),
'b': dict((i, b.count(i)) for i in sorted(b)),
'c': dict((i, c.count(i)) for i in sorted(c)),
}
for which, hand in check.iteritems():
print "Hand: " + which
check_hand(hand)
在这个错误中,我们可以看到该模块是使用模块20131226编译的,有一种方法可以使用新模块来重建它吗?
谢谢大家
答案 0 :(得分:5)
我在github上找到了这个。你可以尝试一下。当我尝试它时没有错误和文件被创建。
答案 1 :(得分:2)
答案 2 :(得分:0)
Windows上的PHP7版本可从https://pecl.php.net/package/dbase获得。
如果您需要PHP {7.1或PHP 7.2 php_dbase.dll
,可以转到https://github.com/nufue/pecl-dbase-windows。
答案 3 :(得分:0)
如果服务器上没有dbase扩展(可能是由于php7实施延迟),我发现了这种纯PHP替代: https://github.com/donfbecker/php-dbase