FatalErrorException in /public_html/app/Http/Controllers/GameController.php line 718:
Call to undefined function App\Http\Controllers\iconv_strlen()
在此代码中:
public function DepositRedirect()
{
if(Auth::guest()) return 'You must be authorized!';
if(!$this->user->trade) return 'You must set trade list in your profile!';
$bot = DB::table('bots')->first();
if(is_null($bot)) return "Bot not found!";
if(iconv_strlen($bot->trade) < 1) return "Admin hasn't set trade link with bot.";
return redirect($bot->trade);
}
为什么?这是标准的php函数,用于返回字符串的字符数我使用php 7.X
答案 0 :(得分:0)
我建议你使用
string Path => Server.MapPath(@"\myPath1");
[System.Web.Services.WebMethod]
[ScriptMethod(UseHttpGet = true)]
public static string GetAvailability()
{
//xdocDetail = XDocument.Load(Path); //THIS DO NOT WORK, NEEDS STATIC STRING
xdocDetail = XDocument.Load(@"C:\Users\Eggii\Source\Repos\adm_app3\ADM_App\Content\Xmls\Detail.xml");
List<DetailList> availabilityList = (from detail in xdocDetail.Descendants("Product")
select new DetailList
{
Detail6 = (string)detail.Element("Availability") ?? "Unknown",
}).ToList();
return JsonConvert.SerializeObject(availabilityList.Select(x => x.Detail6));
}
如果第一个是真的,这将跳过第二个陈述
答案 1 :(得分:0)
我发现了一个问题伙计,问题是从我的PHP来了我不知道为什么,但我使用zesleCP并在全球php iconv启用但在帐户PHP可能不是和不工作我只是用mb_strlen替换iconv_strlen()函数()和问题解决但我将搜索方法如何修复iconv功能:)
答案 2 :(得分:0)
你应该在你的php.ini
中添加extension = iconv.so/opt/zesle/zesle-php71/root/etc/php.ini
/opt/zesle/zesle-php56/root/etc/php.ini