小编may*_*ent的帖子

Codeigntier:无法加载请求的文件:Ubuntu 14.04上的helpers/phpass_helper.php

我试图在我的基本控制器中加载Phpass助手,以便哈希我的密码.但是,它似乎没有在Ubuntu 14.04上加载.我试图搜索,有些人说这可能是因为Linux区分大小写,所以我将文件从phpass_helper.php更改为Phpass_helper.php.并使用以下代码加载它:

$this->load->helper('Phpass_helper');
Run Code Online (Sandbox Code Playgroud)

但它仍然给我错误说:无法加载请求的文件:helpers/phpass_helper.php.有谁知道为什么它不起作用?任何帮助将不胜感激.谢谢.

class PasswordHash {
var $itoa64;
var $iteration_count_log2;
var $portable_hashes;
var $random_state;

function PasswordHash($iteration_count_log2, $portable_hashes)
{
    $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';

    if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31)
        $iteration_count_log2 = 8;
    $this->iteration_count_log2 = $iteration_count_log2;

    $this->portable_hashes = $portable_hashes;

    $this->random_state = microtime();
    if (function_exists('getmypid'))
        $this->random_state .= getmypid();
}

function get_random_bytes($count)
{
    $output = '';
    if (is_readable('/dev/urandom') &&
        ($fh = @fopen('/dev/urandom', 'rb'))) {
        $output = fread($fh, $count);
        fclose($fh);
    }

    if (strlen($output) < $count) {
        $output = '';
        for ($i = 0; …
Run Code Online (Sandbox Code Playgroud)

php ubuntu codeigniter phpass

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

codeigniter ×1

php ×1

phpass ×1

ubuntu ×1