fopen(); “Remote host file access not accepted” on a local file?

前端 未结 7 838
-上瘾入骨i
-上瘾入骨i 2020-12-28 17:54

I am using the Tcpdf module and PHP to create dymanic PDF invoices from an ordering system.

The script should then save the invoice into a folder called \"invoices\"

7条回答
  •  盖世英雄少女心
    2020-12-28 18:49

    similar to user1007017, but just comment the line like shown below (tcpdf 6.2.11)

    public static function fopenLocal($filename, $mode) {
            if (strpos($filename, '://') === false) {
                //$filename = 'file://'.$filename;
            } elseif (stream_is_local($filename) !== true) {
                return false;
            }
            return fopen($filename, $mode);
        }
    

提交回复
热议问题