dsklzerpx64815631 2012-10-07 09:38 采纳率: 100%
浏览 18
已采纳

致命错误:调用database.php中的未定义函数[关闭]

UPDATE Suddenly - without changing anything - it works again ON SOME PAGES, on others it doesn't even show the result of my function function_exists('decod'), any ideas why?

I get this error:

Fatal error: Call to undefined function decod() in database.php on line 10

It worked fine before, here's database.php:

//Decode base64
function decod($string){ 
  $string = base64_decode($string); 
  return ($string); 
} 

//Data double-coded with base64, just to prevent people reading
$host = "localhost";
$user = decod(DOUBLE_ENCRYPTED_USERNAME);
$pass = decod(DOUBLE_ENCRYPTED_PASSWORD);
$db = decod(DOUBLE_ENCRYPTED_DATABASE);

//Connect or print error
$con = mysql_connect($host, decod($user), decod($pass));
if (!$con)
{
    die('Could not connect: ' . mysql_error());
}
//Select database
mysql_select_db(decod($db), $con);
  • 写回答

3条回答 默认 最新

  • dongqianzhan8325 2012-10-07 13:08
    关注

    Human error - turns out my website was pointing at the wrong database.php

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥20 易康econgnition精度验证
  • ¥15 线程问题判断多次进入
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致