支付宝SDK报错 invalid [default store dir]: /tmp/ 解决方法

这个错误主要是出现在windows上面,因为路径错误而导致的。

 解决方法是在SDk里新建一个tmp文件夹,然后打开AopSdkl.php将18行中的

【define("AOP_SDK_WORK_DIR", "/tmp/");】修改为以下代码:

define("AOP_SDK_WORK_DIR", dirname(__FILE__) . "/tmp/");

 转载 : https://www.fengyan.cc/1418.html

--------------------------------------------------------------------------自己项目---------------------------------------------------------------------

这样处理:

if (!defined("AOP_SDK_WORK_DIR"))
{
    $pathname = "/tmp/";
    if(!is_dir($pathname)) { //若目录不存在则创建之
        mkdir($pathname,0777,true);
    }
    define("AOP_SDK_WORK_DIR", "/tmp/");
}

原文地址:https://www.cnblogs.com/yehuisir/p/13389260.html