我workerman項(xiàng)目打包之后想讓讀取data.json文件里面的數(shù)據(jù)
if (Phar::running()) {
echo "在包內(nèi)運(yùn)行 \n";
$filePath = '/../' . __FILE__ . '/data.json';
echo $filePath;
} else {
$filePath = __DIR__ . '/data.json';
}
這個(gè)是我的代碼。不生效,請(qǐng)問(wèn)該如何找到