我需要使用 wordpress 5.5.3 方法散列密码。
Wordpress 使用 wp_hash_password 函数来做到这一点,所以我想我可以加载 wp-load.php 和 class-phpass.php 代码并简单地使用该函数。但是,我的代码不起作用并返回一个空白页:
$password = "abcdef";
require('/wp-includes/class-phpass.php');
require("/wp-load.php");
$hash_password = wp_hash_password($password);
echo $hash_password;
怎么了?有人可以帮助我吗?谢谢!