duanchai0028 2012-09-07 02:34
浏览 32
已采纳

我的PHP的hash_algos()函数不再有效

I'm not entirely sure what version of PHP, but I'm thinking it's in the 5.2 (Relatively new installtion of XAMPP). There was a certain site I built and it relied heavily on the php function hash_algos() to populate a drop down list, but it seems as of late that the hash_algos() returns absolutely nothing. Also, using windows, if XAMPP didn't give it away.

The site used to work, but doesn't anymore, and I'm not sure why, I haven't changed anything in the code. Here's the part of the site that isn't working

<select name="method" id="method">
<?
foreach(hash_algos() as $m)
{
echo "<option value=\"".$m."\">".$m."</option>";
}
?>
</select>
  • 写回答

2条回答 默认 最新

  • dsgwii4867 2012-09-07 02:37
    关注

    You need to have the Hash PECL package enabled.

    This question may be of use to you: How to switch hash_algos() on ? I'm with Php 5.2.11

    Edit: Since you're on Windows, you'll likely have to compile the "Hash" package yourself. It appears to be available on the PECL website but is no longer maintained.

    To compile from source, PHP has a step by step guide.

    After you've compiled the DLL or got ahold of one, you need to add it to your php.ini file.

    You'll need to add a line like the following:

    extension=php_hash.dll
    

    More information is available on PHP's Windows site.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛