nina
05-13-2008, 11:34 AM
Please help me, I'm trying but not success.:(
I addon a domain name and made a sub folder inside.
subdomain --name is visa--for my website and set ftp. for upload files.
and I add mysql database 1 account. --name of my database is joy--
and I have make a file for test.--xxxx.php--
my code is:
<?php
function connOpen(){
$host="xx.xxx.xxx.xxx";
$username="username";
$password="password";
$conn=mysql_connect($host,$username,$password);
if(!$conn){
echo "connection accomplete";
}else{
mysql_select_db("myhomedirectory_dbjoy");
echo "connection complete";
}
}
function connClose(){
mysql_close();
}
function access_permit(){
}
function servermappath(){
return realpath("/");
}
connOpen();
?>
After then I upload file xxxx.php by ftp program.
I upload it to sub domain name is visa
After then I test open file in my website is http://visa.mydomainname.com/xxxx.php
then I find this messege
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'joy'@'hostxxx.hostmonster.com' (using password: YES) in /home/myhomedirectory/public_html/myaddondomain/visa/constant.php on line 6
connection accomplete
Thank you for your time.
Nina:(
I addon a domain name and made a sub folder inside.
subdomain --name is visa--for my website and set ftp. for upload files.
and I add mysql database 1 account. --name of my database is joy--
and I have make a file for test.--xxxx.php--
my code is:
<?php
function connOpen(){
$host="xx.xxx.xxx.xxx";
$username="username";
$password="password";
$conn=mysql_connect($host,$username,$password);
if(!$conn){
echo "connection accomplete";
}else{
mysql_select_db("myhomedirectory_dbjoy");
echo "connection complete";
}
}
function connClose(){
mysql_close();
}
function access_permit(){
}
function servermappath(){
return realpath("/");
}
connOpen();
?>
After then I upload file xxxx.php by ftp program.
I upload it to sub domain name is visa
After then I test open file in my website is http://visa.mydomainname.com/xxxx.php
then I find this messege
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'joy'@'hostxxx.hostmonster.com' (using password: YES) in /home/myhomedirectory/public_html/myaddondomain/visa/constant.php on line 6
connection accomplete
Thank you for your time.
Nina:(