耗尽的允许的内存大小为268435456字节(尝试分配116420021字节)

/home/oamrtfttrtgf/public_html/vendor/dompdf/dompdf/src/Dompdf.php

    /**
     * Loads an HTML string
     * Parse errors are stored in the global array _dompdf_warnings.
     * @todo use the $encoding variable
     *
     * @param string $str HTML text to load
     * @param string $encoding Not used yet
     */
    public function loadHtml($str,$encoding = 'UTF-8')
    {
        $this->saveLocale();

        // FIXME: Determine character encoding,switch to UTF8,update meta tag. Need better http/file stream encoding detection,currently relies on text or meta tag.
        $known_encodings = mb_list_encodings();
        mb_detect_order('auto');
        if (($file_encoding = mb_detect_encoding($str,null,true)) === false) {
            $file_encoding = "auto";
        }
        if (in_array(strtoupper($file_encoding),array('UTF-8','UTF8')) === false) {
            $str = mb_convert_encoding($str,'UTF-8',$file_encoding);
        }

        $metatags = array(
            '@<meta\s+http-equiv="Content-Type"\s+content="(?:[\w/]+)(?:;\s*?charset=([^\s"]+))?@i','@<meta\s+content="(?:[\w/]+)(?:;\s*?charset=([^\s"]+))"?\s+http-equiv="Content-Type"@i','@<meta [^>]*charset\s*=\s*["\']?\s*([^"\' ]+)@i',);
        foreach ($metatags as $metatag) {
            if (preg_match($metatag,$str,$matches)) {
                if (isset($matches[1]) && in_array($matches[1],$known_encodings)) {
                    $document_encoding = $matches[1];
                    break;
                }
            }
nimadedajibamaochuiz 回答:耗尽的允许的内存大小为268435456字节(尝试分配116420021字节)

如果这是您遇到的错误,将耗尽268435456字节的允许内存大小(尝试分配116420021字节)。这是PHP内存限制耗尽错误,您可以通过以下操作来解决。

要增加PHP内存限制设置,请编辑PHP.ini文件。

只需增加php.ini中PHP内存限制行的默认值

memory_limit = 1024M
本文链接:https://www.f2er.com/3154941.html

大家都在问