调用未定义的函数password_hash() [英] Call to undefined function password_hash()

查看:336
本文介绍了调用未定义的函数password_hash()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我开发网站时,我现在正在本地主机上运行php版本5.4.16.我想使用password_hash(),但我不断收到此错误:

I am running php version 5.4.16 on localhost right now, while I am developing my site. I want to use password_hash(), but I keep getting this error:

致命错误: 123

为什么会这样?

谢谢!

推荐答案

新的password_*方法仅在PHP 5.5及更高版本中可用:

The new password_* methods are only available as of PHP 5.5:

http://www.php.net/manual/en/function.password-hash .php

看看这个提供前向兼容性的库:

Take a look at this library that provides forward compatibility:

https://github.com/ircmaxell/password_compat

您可以使用它来访问新的password_*方法,直到能够运行PHP 5.5.

You can use that to get access to the new password_* methods until you are able to run PHP 5.5.

这篇关于调用未定义的函数password_hash()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆