MC RzA

Welcome/Mir Se Vini !
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Si te bejme nje Error Page kur MySQL eshte Offline

View previous topic View next topic Go down 
AuthorMessage
MC RzA
Admin


Posts : 181
Join date : 2009-10-27

PostSubject: Si te bejme nje Error Page kur MySQL eshte Offline   Wed Oct 28, 2009 5:55 am

Sot do te ju mesoj se si te bejme nje error page kur MySQL serveri na del offline

Pra ndiqni hapat e mij dhe besoj se do te keni suskes

1. Se pari e krijojme nje HTML page te rreje me emrin noconnection.html

Dhe ne ate dokument futni kete kod dhe e ruani ne (public_html):

Kodet PHP:
<HTML>
<HEAD>
<TITLE>Couldn't connect to MySQL database!!</TITLE>
<style type="text/css">
.error {color: red; font-family: Arial; font-size: 20px;}
</style>
</HEAD>

<BODY>
<p align="center">
<span class="error">
Couldn't Connect To MySQLdatabase! Please Try Again Latter
</span>
</p>
</BODY>

</HTML>

Pas ketij hapi shkoni ne file-n Config.php dhe ndodh qe ky file quhet (Config.php-db-info.php)
ose kerkoni per FIle-n i cili permban informacionet per kyqjen ne Databaz .

Do te dukej diqka e ngjashem me kete :

Kodet PHP:
<?php
$dbhost = "localhost";
$dbname = "name";
$dbuname = "datapass user name";
$ppass = "the secret word";
$connectdb=mysql_connect($dbhost,$dbuname,$ppass);
$xx=@mysql_select_db($dbname,$connectdb);
?>
Shtojani ne rreshtin mysql_select_db rreshti i cili permban :

Kodet PHP:
@mysql_select_db($dbname,$connectdb);

if (!$xx) {
include ("noconnection.html");
exit();
}


File-i config.php do te duket keshtu :

Kodet PHP:
<?php

$dbhost = "localhost";
$dbname = "name";
$dbuname = "datapass user name";
$ppass = "the password";
$connectdb=mysql_connect($dbhost,$dbuname,$ppass);
$xx=@mysql_select_db($dbname,$connectdb);
if (!$xx) {
include ("noconnection.html");
exit();
}

?>

Tani nese serveri juaj MySQL del offline kjo faqe do te paraqitet.

Eshte nje error mjaft i perhapun neper servera Free
Back to top Go down
View user profile http://mc-rza.forumotion.com
 
Si te bejme nje Error Page kur MySQL eshte Offline
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» According to the front page at CHM.....
» Info on Stooges and Iggy Pop vinyl reissues and originals
» news on the Stooges MySpace page
» I94 Bar Tribute page
» 7 PAGE STOOGES FEATURE

Permissions in this forum:You cannot reply to topics in this forum
MC RzA :: Mësime/Tutorials-
Jump to: