问题描述
我正在尝试运行define('MYCONST',"THE VALUE");
function exists_a_constant($value)
{
$constants = get_defined_constants(true);
return in_array($value,$constants['user']); // true if finds or false if not
// return array_search($value,$constants['user']); //Will return the key (name of the constant)
}
function checkVars($var)
{
if (exists_a_constant($var)) {
echo "exists a constant";
} else {
echo "not";
}
}
checkVars(MYCONST);
// exists a constant
checkVars('MYCONST');
// not
checkVars("THE VALUE");
// exists a constant
checkVars("random string");
// not
,但它给了我以下错误:
npm run android
我得到这样的东西:
EPERM: Oparation not permited,read
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)