MC RzA
Would you like to react to this message? Create an account in a few clicks or log in to continue.

MC RzA

Welcome/Mir Se Vini !
 
HomeLatest imagesSearchRegisterLog in

 

 Si te bejme nje Error Page kur MySQL eshte Offline

Go down 
AuthorMessage
MC RzA
Admin



Posts : 181
Join date : 2009-10-27

Si te bejme nje Error Page kur MySQL eshte Offline Empty
PostSubject: Si te bejme nje Error Page kur MySQL eshte Offline   Si te bejme nje Error Page kur MySQL eshte Offline I_icon_minitimeWed 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
https://mc-rza.forumotion.com
 
Si te bejme nje Error Page kur MySQL eshte Offline
Back to top 
Page 1 of 1
 Similar topics
-
» Si te bejme nje Folder me Password pa ndonje program
» Si ta rregullojme Messenger error code 80072efd

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