ขอถามหน่อย ครับ พอดี ผมอับโหลด ขึ้น host แล้ว มันเกิดปันหาแบบเน้ ครับ
ขอถามหน่อย ครับ พอดี ผมอับโหลด ขึ้น host แล้ว มันเกิดปันหาแบบเน้ ครับ
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'viacardcoth'@'localhost' (using password: YES) in /data/vhosts/viacard.co.th/httpdocs/th/config.php on line 6
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /data/vhosts/viacard.co.th/httpdocs/th/index.php:113) in /data/vhosts/viacard.co.th/httpdocs/th/common/log_box.php on line 11
นี้คือไฟล์ config
<?php
$username='viacardcoth';
$pass='1qazxsw2-=';
$host='localhost';
$dbname='viacardcoth';
$con = mysql_connect($host, $username, $pass);
if (!$con)
{
//die('Could not connect: ' . mysql_error());
$msg = 'Could not connect: ' . mysql_error(); //array('Connection Error!','Could not connect Database');
return $msg;
} else {
mysql_select_db($dbname, $con);
}
?>
นี้คือไฟล์ index
<STYLE TYPE="TEXT/CSS"><!--
A:link {
text-decoration:none;
}
A:visited {
text-decoration:none;
}
//--></STYLE>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="shortcut icon" type="image/x-icon" href="/viafavi.ico">
<title>ViA Instant Access</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="verify-v1" content="ef91/3kgD9HBeaUwp1v5HQPecAbjoVaWaTUkV8HniIM=" />
<!--meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" name="Lars Olof Kanngard"-->
<!-- MetaTags Generated by Lars Olof Kanngard ©1998 - 2010 http://www.McGordons.com -->
<meta name="author" content="Lars Olof Kanngrd" >
<meta name="Description" content="ViA a holistic and secure payment methodology in a better way!" >
<meta name="distribution" content="Global" >
<meta name="Keywords" content="lars, lars olof, kanngard, engstrom, mats, via, via instent access, secure, card, pos, transactions, hub, complimentary currencis, unbankeble," >
<meta name="rating" content="General" >
<meta name="Reply-to" content="[email protected] " >
<meta name="revisit-after" content="5 days" >
<meta name="ROBOTS" content="ALL" >
<meta name="copyright" content="Lars Olof Kanngard 1998-2010" >
<link rel="stylesheet" type="text/css" href="style.css">
<script type="text/JavaScript"><!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!--
.style1 {color: #8FC845}
-->
</style>
</head>
<body onLoad="MM_preloadImages('images/home-btn.jpg','images/about-over.jpg','images/products-over.jpg','images/news-over.jpg','images/press-over.jpg','images/login-over.jpg','images/register-over.jpg','images/links-over.jpg','images/contact-over.jpg','images/downloads-over.jpg')">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top"><table width="896" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="57" align="left" valign="top" background="images/bg-left.jpg"> </td>
<td width="782" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="164"><a href="index.php"><img src="images/logo.jpg" width="164" height="107" border="0"></a></td>
<td width="355">
<img src="images/slogan.jpg" width="354" height="107"></td>
<td width="34%" align="left" background="images/right-top1.jpg" style="padding-left:8px; ">
<table><tr>
<table><tr>
<td style="width:130px"> </td>
<td>
Language <a href="../change.php?lang=TH"><img src="images/thth.gif"border="0"> </a>
<a href="../change.php?lang=EN"><img src="images/uk-lgflag.gif"border="0"></a>
</td></tr></table>
<?php include "common/log_box.php"; ?>
</td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="164" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/menu-top.jpg" width="164" height="43"></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top"><a href="index.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Home','','images/home-btn.jpg',1)"><img src="images/home-btn.jpg" alt="Home" name="Home" width="68" height="19" border="0"></a></td>
</tr>
<tr>
<td align="left" valign="top" style="border-top:1px dotted #BCBCBC; border-bottom:1px dotted #BCBCBC; border-left:1px solid #B3B3B3;"><a href="ViAabout_us.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('About ViA','','images/about-over.jpg',1)"><img src="images/about-btn.jpg" alt="About ViA" name="About ViA" width="99" height="27" border="0"></a></td>
</tr>
<tr>
<td align="left" valign="top" style="border-bottom:1px dotted #BCBCBC; "><a href="ViAproduct.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Products','','images/products-over.jpg',1)"><img src="images/products-btn.jpg" alt="Products" name="Products" width="93" height="26" border="0"></a></td>
</tr>
<tr>
<td align="left" valign="top" style="border-bottom:1px dotted #BCBCBC; "><a href="ViAnews_center.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('News Center','','images/news-over.jpg',1)"><img src="images/news-btn.jpg" alt="News Center" name="News Center" width="142" height="25" border="0"></a></td>
</tr>
<tr>
<td align="left" valign="top" style="border-bottom:1px dotted #BCBCBC; "><a href="ViApress_release.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Press Release','','images/press-over.jpg',1)"><img src="images/press-btn.jpg" alt="Press Release" name="Press Release" width="126" height="26" border="0"></a></td>
</tr>
<tr>
<td align="left" valign="top" style="border-bottom:1px dotted #BCBCBC;"><a href="ViApamphlets_media.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Log In','','images/login-over.jpg',1)"><img src="images/login-btn.jpg" alt="Log In" name="Log In" width="158" height="25" border="0"></a></td>
</tr>
<tr>
<td align="left" valign="top" style="border-bottom:1px dotted #BCBCBC; "><a href="ViAregister.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Register','','images/register-over.jpg',1)"><img src="images/register-btn.jpg" alt="Register" name="Register" width="85" height="23" border="0"></a></td>
</tr>
<tr>
<td align="left" valign="top" style="border-bottom:1px dotted #BCBCBC; "><a href="ViAvia_link.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('ViA Links','','images/links-over.jpg',1)"><img src="images/links-btn.jpg" alt="ViA Links" name="ViA Links" width="87" height="28" border="0"></a></td>
</tr>
<tr>
<td align="left" valign="top" style="border-bottom:1px dotted #BCBCBC; "><a href="ViAcontact.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Contact','','images/contact-over.jpg',1)"><img src="images/contact-btn.jpg" alt="Contact" name="Contact" width="82" height="23" border="0"></a></td>
</tr>
<tr>
<td align="left" valign="top" style="border-bottom:1px dotted #BCBCBC; "><a href="ViAdownloads.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Downloads','','images/downloads-over.jpg',1)"><img src="images/downloads-btn.jpg" alt="Downloads" name="Downloads" width="110" height="23" border="0"></a></td>
</tr>
<tr> <td align="left" valign="top" style="border-bottom:1px dotted #BCBCBC; "><a href="ViAvideos.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Videos','','images/video-over.jpg',1)"><img src="images/video-btn.jpg" alt="Video's" name="Videos" width="110" height="23" border="0"></a></td>
</tr>
<tr>
<td align="left" valign="top" ><img src="images/menu-btm.jpg" width="164" height="39"></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" bgcolor="#8FC845" style="padding-left:25px; "><br>
<?php include "common/news_box.php" ?>
</td>
</tr>
<tr> <td bgcolor="#8FC845"><img src="images/news-btm.jpg" width="163" height="38"></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/susbcribe-heading.jpg" width="164" height="56"></td>
</tr>
<tr>
<td valign="top" background="images/subscribe-bg.jpg" style="padding-left:12px; ">
<?php include "common/industry_box.php"; ?>
</td>
</tr>
<tr> <td><img src="images/subscribe-btm.jpg" width="164" height="41"></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td align="center"><a href="subscribe.php"><img src="images/newsletter-banner.jpg" width="161" height="62" border="0"></a></td>
</tr>
</table></td>
<td width="618" align="left" valign="top">
<p>
<?php include "contents/index.htm"; ?>
</p>
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="4"></td>
</tr>
<tr>
<?php include "common/footer.php"; ?>
</tr>
</table></td>
<td width="57" align="left" valign="top" background="images/bg-right.jpg"> </td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
นี้คือไฟล์ log_box
<?php
error_reporting(E_ALL ^ E_NOTICE);
include "config.php"; ?>
<script type="text/javascript" src="script/ajax.js"></script>
<script type="text/javascript" src="script/script.js"></script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" class="memberlogin">
<?php
session_start();
if($_SESSION['login'] == "1")
{
?>
Status :Logged In <br /><br />
<a style="color:#006600;" href="ViAcorporate_login.php" class="weblink">Expanded Menus</a> | <a href="#" onclick="return signout();" class="weblink">logout</a>
<?php
}
?>
<span id="logerror" style="color:red; font-weight:normal;"></span> </td>
</tr>
<?php if($_SESSION['login'] != "1") { ?>
<tr>
<td align="left" style="padding-top:5px; "><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="left">
<td width="25%" height="20">อีเมล:</td>
<td height="20" colspan="2"><input id="email" name="textfield3" type="text" class="textfield" ></td>
</tr>
<tr align="left">
<td height="20">รหัสผ่าน:</td>
<td width="41%" height="20">
<input id="pword" name="textfield22" type="password" class="textfield" size="20" > </td><td width="34%" style="padding-left:8px; "><a href="#" onclick="return login();"><img src="images/signup-btn.jpg" width="57" height="16" border="0"></a></td>
</tr>
<tr align="left">
<td><?php if($_SESSION['login'] == "1") { ?>ออกจากระบบ| <?php } ?></td>
<td height="20" colspan="2">
<a href="ViAregister.php" class="weblink">
สมัครสมาชิก </a> | <a href="forgot_password.php" class="weblink">
ลืมรหัสผ่าน?</a> </td>
</tr>
</table></td>
</tr>
<?php } ?>
</table>Tag : PHP
Date :
2011-09-20 11:55:15
By :
wave777
View :
818
Reply :
1
connect ผิดครับ ลองตัวสอบ Username , Password , database name , host ดูอีกทีครับ
Date :
2011-09-20 11:58:04
By :
adaaugusta
Load balance : Server 00