首页 > 编程技术 > php

phpmyadmin 配置方法与安装教程

发布时间:2016-11-25 17:41

今天我们来看看phpmyadmin 配置教程吧,也可以叫做phpmyadmin 安装吧,安装我就不说了,你直接到网上下载一个phpmyadmin包解压到你的站点目录,就行了.下面我们来看个简单的例子吧.

安装目录:/admin/

好了我们现在打开我们刚才解压的文件夹找到config.sample.inc.php 把它改名为config.inc.php下面我们就打开这个文件.

找到

$cfg['PmaAbsoluteUri'] = '';
$cfg['EexecTimeLimit'] = ;

我们把$cfg['PamAbsolteUri]设置为你的目录我的是/admin/目录,$cfg['EexecTimeLimit'] 我设置为10000

$cfg['PmaAbsoluteUri'] = '/admin/''';
$cfg['EexecTimeLimit'] = 10000;

再找到$cfg['blowfish_secret'] = '';

$cfg['blowfish_secret'] = 'cookie';

找到$cfg['Servers'][$i]['host']          = '' // MySQL hostname or IP address

这里是设置连接mysql主机的,可以是主机也可以是IP地址.

$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address

下面再找到.

$cfg['Servers'][$i]['auth_type']     = '';    // Authentication method (valid choices: config, http, HTTP, signon or cookie)
$cfg['Servers'][$i]['user']          = '';      // MySQL user
$cfg['Servers'][$i]['password']      = ''; 

上面三种什么意思我就不多说了各位看看我的配置吧.

$cfg['Servers'][$i]['auth_type']     = 'cookie';    // Authentication method (valid choices: config, http, HTTP, signon or cookie)
$cfg['Servers'][$i]['user']          = 'p123456';      // 你的mysql用户
$cfg['Servers'][$i]['password']      = '******';  这是你的mysql密码

好了现在把cofing.inc.php上传到服务器就OK了.好了写完了

 

1045 Access denied for user 'root'@'localhost' (using password: YES)

1045 Access denied for user 'root'@'localhost' (using password: YES)


原因是:
你的phpmyadmin设置了密码,但是你的密码与mysql server用户名与密码不致我造成的.

#1045 - Access denied for user 'root'@'localhost' (using password: NO)

本站原创转载请注明出处吧.  www.111cn.net  

FCKeditor去除一些不要的菜单 这样不既然美观也方式了,下面我们就来看看我去了fck菜单的过程吧.

我们找到你fckeditor所在的目录.

editor/fckconfing.js这个文件,修改如下.

找到.

FCKConfig.ToolbarSets["Default"] 这一句,下面就是个数组了.

['Source','DocProps','-','Save','NewPage'],


 ['PasteWord'],


 ['Find','Replace'],


 ['ImageButton'],

 ['JustifyLeft','JustifyCenter','JustifyRight'],


 ['Link','Unlink'],


 ['Flash','PageBreak'],

 ['FontSize'],


 ['TextColor','BGColor'],

] ;

这是我的配置最后的效果哪.

fck配置

本站原创转注明:   www.111cn.net/php/phper.html 

 

造成这个错误的原因多数是因为论坛升级、编码转换造成的!
如果对PHP熟悉的人,可以直接找到出错的地方,分析出错信息是对哪个数据库表操作时造成的(一般都是论坛的基本数据表),然后,找到相应表的原版数据导进去,问题可解决。
如果对PHP不熟悉的人,可以按出错信息提示的位置,用2楼的修改方法进行修改,问题可解决。
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
</body>
</html>
{dxh:php/dxh}

1Array
(
    [0] => {dxh:/dxh}

    [1] => fdafa

    [2] => fdafda

    [3] => {dxh:php/dxh}
)
<br />
<b>Notice</b>:  Undefined variable: temp in <b>F:mywebwkb.php</b> on line <b>34</b><br />


问题Warning: Invalid argument supplied for foreach() in 完善解决方案
将报错的语句做如下修改(例):


QUOTE:
foreach($extcredits as $id => $credit)
{
         if($credit['ratio'])
         {
                 $exchcredits[$id] = $credit;
         }
}

改为


QUOTE:
if(is_array($extcredits))    //add
{                          
         foreach($extcredits as $id => $credit)
         {
                  if($credit['ratio'])
                  {
                              $exchcredits[$id] = $credit;
                  }        
        }
}   //add


QUOTE:
foreach((array)$extcredits as $id => $credit)
{
         if($credit['ratio'])
         {
                 $exchcredits[$id] = $credit;
         }
}

 

foreach(array('_COOKIE', '_POST', '_GET') as $_request) {
       foreach($$_request as $_key => $_value) {
              $_key{0} != '_' && $$_key = daddslashes($_value);
       }
}
$_request是PHP的一个内置变量吧?$$_request是什么意思

 

大写的才是PHP的超级全局变量
$_REQUEST
上面的代码里$_request 是一个普通变量

$$_request 的意思就是 用 $_request的值作为变量名!
比如:

 
$name = 'blueidea';
$$name 就相当于  $blueidea

class class_name
{
  var $attribute;
  function __get($name)
  {
   return $this -> $name;
  }
  function __set($name,$value)
  {
    $this -> $name = $value;
  }

}
$a = new class_name();
$a -> attribute = 5;//__set()设置属性值
$a -> attribute; //__get()检查属性值

 

标签:[!--infotagslink--]

您可能感兴趣的文章: