Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[求助] config_global.php文件不小心删除了

[复制链接]
binklesese 发表于 2018-4-23 16:36:28 | 显示全部楼层 |阅读模式
config_global.php文件不小心删除了
过程:本来是想的找回后台登录密码,在一家帖子上发现,说修改 config_global.php文件,然后就修改了,然后就悲催了,网站打开一片乱码,又按照某网站的提示下载源文件,说是修改完就好了,可是不会修改啊,怎么修改啊,请教下各位大侠。
最懒站长 发表于 2018-4-23 16:43:03 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

 楼主| binklesese 发表于 2018-4-23 16:43:34 | 显示全部楼层
我的网站地址:http://minqin.zzcn.org
回复

使用道具 举报

 楼主| binklesese 发表于 2018-4-23 16:47:18 | 显示全部楼层
最懒站长 发表于 2018-4-23 16:43
下载官方的config_global.php重新上传 填写数据库用户名 数据库密码

在哪下载啊,又在哪儿填写啊,数据库用户名和密码是哪个哦。麻烦说详细点,好吗?
回复

使用道具 举报

crx349 发表于 2018-4-23 17:47:56 | 显示全部楼层
config/config_global_default.php
按这个文件格式 改一个哦
回复

使用道具 举报

kniflare 发表于 2018-4-24 11:00:35 | 显示全部楼层
楼上正解,我也遇到config_global.php被修改的问题。黑客每天来修改一次,我也是醉了……
回复

使用道具 举报

jameson512 发表于 2018-4-24 11:16:06 | 显示全部楼层
重新将 /config/config_global_default.php复制为 config_global.php,然后修改里面的的数据库信息,就可以了
或者简单点,直接复制下方代码,将数据库信息填写上,保存为config_global.php文件,上传到/config目录下,注意保存时编码要为gbk

  1. <?php


  2. $_config = array();

  3. // ----------------------------  CONFIG DB  ----------------------------- //
  4. $_config['db']['1']['dbhost'] = 'localhost';
  5. $_config['db']['1']['dbuser'] = '';//数据库用户名
  6. $_config['db']['1']['dbpw'] = '';//数据密码
  7. $_config['db']['1']['dbcharset'] = 'gbk';
  8. $_config['db']['1']['pconnect'] = '0';
  9. $_config['db']['1']['dbname'] = 'dx33gbk';//数据库名称
  10. $_config['db']['1']['tablepre'] = 'pre_';//数据库前缀
  11. $_config['db']['slave'] = '';
  12. $_config['db']['common']['slave_except_table'] = '';

  13. // --------------------------  CONFIG MEMORY  --------------------------- //
  14. $_config['memory']['prefix'] = 'm6KqFr_';
  15. $_config['memory']['redis']['server'] = '';
  16. $_config['memory']['redis']['port'] = 6379;
  17. $_config['memory']['redis']['pconnect'] = 1;
  18. $_config['memory']['redis']['timeout'] = '0';
  19. $_config['memory']['redis']['requirepass'] = '';
  20. $_config['memory']['redis']['serializer'] = 1;
  21. $_config['memory']['memcache']['server'] = '';
  22. $_config['memory']['memcache']['port'] = 11211;
  23. $_config['memory']['memcache']['pconnect'] = 1;
  24. $_config['memory']['memcache']['timeout'] = 1;
  25. $_config['memory']['apc'] = 1;
  26. $_config['memory']['xcache'] = 1;
  27. $_config['memory']['eaccelerator'] = 1;
  28. $_config['memory']['wincache'] = 1;
  29. $_config['memory']['file']['server'] = '';

  30. // --------------------------  CONFIG SERVER  --------------------------- //
  31. $_config['server']['id'] = 1;

  32. // -------------------------  CONFIG DOWNLOAD  -------------------------- //
  33. $_config['download']['readmod'] = 2;
  34. $_config['download']['xsendfile']['type'] = '0';
  35. $_config['download']['xsendfile']['dir'] = '/down/';

  36. // --------------------------  CONFIG OUTPUT  --------------------------- //
  37. $_config['output']['charset'] = 'gbk';
  38. $_config['output']['forceheader'] = 1;
  39. $_config['output']['gzip'] = '0';
  40. $_config['output']['tplrefresh'] = 1;
  41. $_config['output']['language'] = 'zh_cn';
  42. $_config['output']['staticurl'] = 'static/';
  43. $_config['output']['ajaxvalidate'] = '0';
  44. $_config['output']['iecompatible'] = '0';

  45. // --------------------------  CONFIG COOKIE  --------------------------- //
  46. $_config['cookie']['cookiepre'] = 'H5yz_';
  47. $_config['cookie']['cookiedomain'] = '';
  48. $_config['cookie']['cookiepath'] = '/';

  49. // -------------------------  CONFIG SECURITY  -------------------------- //
  50. $_config['security']['authkey'] = 'af8075ZYq7rih2CX';//此处可以自行修改为其他的字符串
  51. $_config['security']['urlxssdefend'] = 1;
  52. $_config['security']['attackevasive'] = '0';
  53. $_config['security']['querysafe']['status'] = 1;
  54. $_config['security']['querysafe']['dfunction']['0'] = 'load_file';
  55. $_config['security']['querysafe']['dfunction']['1'] = 'hex';
  56. $_config['security']['querysafe']['dfunction']['2'] = 'substring';
  57. $_config['security']['querysafe']['dfunction']['3'] = 'if';
  58. $_config['security']['querysafe']['dfunction']['4'] = 'ord';
  59. $_config['security']['querysafe']['dfunction']['5'] = 'char';
  60. $_config['security']['querysafe']['daction']['0'] = '@';
  61. $_config['security']['querysafe']['daction']['1'] = 'intooutfile';
  62. $_config['security']['querysafe']['daction']['2'] = 'intodumpfile';
  63. $_config['security']['querysafe']['daction']['3'] = 'unionselect';
  64. $_config['security']['querysafe']['daction']['4'] = '(select';
  65. $_config['security']['querysafe']['daction']['5'] = 'unionall';
  66. $_config['security']['querysafe']['daction']['6'] = 'uniondistinct';
  67. $_config['security']['querysafe']['dnote']['0'] = '/*';
  68. $_config['security']['querysafe']['dnote']['1'] = '*/';
  69. $_config['security']['querysafe']['dnote']['2'] = '#';
  70. $_config['security']['querysafe']['dnote']['3'] = '--';
  71. $_config['security']['querysafe']['dnote']['4'] = '"';
  72. $_config['security']['querysafe']['dlikehex'] = 1;
  73. $_config['security']['querysafe']['afullnote'] = '0';

  74. // --------------------------  CONFIG ADMINCP  -------------------------- //
  75. // -------- Founders: $_config['admincp']['founder'] = '1,2,3'; --------- //
  76. $_config['admincp']['founder'] = '1';
  77. $_config['admincp']['forcesecques'] = '0';
  78. $_config['admincp']['checkip'] = 1;
  79. $_config['admincp']['runquery'] = '0';
  80. $_config['admincp']['dbimport'] = 1;

  81. // --------------------------  CONFIG REMOTE  --------------------------- //
  82. $_config['remote']['on'] = '0';
  83. $_config['remote']['dir'] = 'remote';
  84. $_config['remote']['appkey'] = '62cf0b3c3e6a4c9468e7216839721d8e';
  85. $_config['remote']['cron'] = '0';

  86. // ---------------------------  CONFIG INPUT  --------------------------- //
  87. $_config['input']['compatible'] = 1;
复制代码


回复

使用道具 举报

 楼主| binklesese 发表于 2018-4-24 17:59:09 | 显示全部楼层
jameson512 发表于 2018-4-24 11:16
重新将 /config/config_global_default.php复制为 config_global.php,然后修改里面的的数据库信息,就可以 ...

真在万分感谢,但是数据库的账号和密码,我怎么没印象啊,去哪儿找啊。不要骂我哦,快40了学建站,支持哈哦,谢谢 了哦
回复

使用道具 举报

 楼主| binklesese 发表于 2018-4-24 18:10:10 | 显示全部楼层
用flashfxp也登陆不上了,究竟是怎么了啊。。。。求救啊,,,,
回复

使用道具 举报

 楼主| binklesese 发表于 2018-4-24 19:41:17 | 显示全部楼层
有没有在线在大侠工,帮我解决一下,好吗,在线急等。。。。。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-11-30 11:33 , Processed in 0.030190 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表