איך בונים אתר עם s0wh4tsCMS אני לא מוצא מדריך ואני לא מבין מה לערוך...
איך בונים אתר עם s0wh4tsCMS אני לא מוצא מדריך ואני לא מבין מה לערוך...
|
|
תערוך את הקובץ config.php
שיפה באתר הזה שאתה לא צריך להכניס אליו אייפי![]()
אבל אני לא מוצא שם איפה להכניס את הIP אין שם
תביא את כל מה שרשום בקובץ Config ותשים את זה בתג PHP.
שלום שלום
תחפש קובץ בשם DB או Config או DataBase ותחפש שם host..
הנה
קוד PHP:<?php
session_start();
/* MySQL */
$host = "localhost"; /* your host - standard: localhost */
$user = "root"; /* your database user - standard: root */
$pass = ""; /* your database password - standard: root */
$database = "odinms"; /* your database name - standard: odinms */
$conn = mysql_connect($host,$user,$pass);
$db = mysql_select_db($database, $conn) or die(mysql_error());
$forumurl = "http://"; /* your forum url */
$sitetitle = "YourMS";
$client = "http://"; /* URL to your client */
$servername = "YourMS"; /* Name of your private server */
/* User online check */
if(isset($_SESSION['id'])){
$logouttime = 300;
$timenow = time();
$loggedtime = $timenow - $logouttime;
$query = mysql_query("UPDATE `accounts` SET `sitelogged` = '".$timenow."' WHERE `id`='".$_SESSION['id']."'") or die(mysql_error());
$retrieve = mysql_query("SELECT * FROM `accounts` WHERE `sitelogged` >= '".$loggedtime."'") or die(mysql_error());
$online = mysql_fetch_array($retrieve);
}
/* Functions */
function getOnline(){
$logouttime = 300;
$timenow = time();
$loggedtime = $timenow - $logouttime;
$a = mysql_query("SELECT * FROM `accounts` WHERE `sitelogged` >= '".$loggedtime."'") or die(mysql_error());
$b = mysql_num_rows($a);
return $b;
}
function onlineCheck($string){
$logouttime = 300;
$timenow = time();
$loggedtime = $timenow - $logouttime;
$a = mysql_query("SELECT * FROM `accounts` WHERE `sitelogged` >= '".$loggedtime."' AND `id`='".$string."'") or die(mysql_error());
$b = mysql_fetch_array($a);
if($b['sitelogged'] >= $loggedtime){
$check = "<img src=\"images/online.png\" height=\"13\" width=\"13\">";
}else{
$check = "<img src=\"images/offline.png\" height=\"13\" width=\"13\">";
}
return $check;
}
function getID($string){
$a = mysql_query("SELECT * FROM `web_profile` WHERE `name`='".$string."'") or die(mysql_error());
$b = mysql_fetch_array($a);
return $b['accountid'];
}
function getName(){
$a = mysql_query("SELECT * FROM `accounts` WHERE `id`='".$_SESSION['id']."'") or die(mysql_error());
$b = mysql_fetch_array($a);
return $b['name'];
}
?>
$host = "localhost"; /* your host - standard: localhost */
תערוך שמה את האייפי.
שלום שלום
שאני נכנס לאתר זה רושם לי ככה
ואם אני משאיר localhost מופיע אתר אבל מובלגן כזהקוד:Notice: A session had already been started - ignoring session_start() in C:\wamp\www\s0wh4tsCMS\config.php on line 2 Warning: mysql_connect() [function.mysql-connect]: Host 'mp202' is not allowed to connect to this MySQL server in C:\wamp\www\s0wh4tsCMS\config.php on line 9 Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in C:\wamp\www\s0wh4tsCMS\config.php on line 10 Host 'mp202' is not allowed to connect to this MySQL server
נערך לאחרונה על ידי xNewNick; 01-03-2010 בשעה 18:45.
תבדוק את הקובץ Config של הקבצי אתר.
זהו חזי החזרזיר והוא על סמים קשים!
<?php
session_start();
/* MySQL */
$host = "localhost"; /* your host - standard: localhost */
$user = "root"; /* your database user - standard: root */
$pass = ""; /* your database password - standard: root */
$database = "odinms"; /* your database name - standard: odinms */
$conn = mysql_connect($host,$user,$pass);
$db = mysql_select_db($database, $conn) or die(mysql_error());
$forumurl = "http://"; /* your forum url */
$sitetitle = "YourMS";
$client = "http://"; /* URL to your client */
$servername = "YourMS"; /* Name of your private server */
כל החלק הזה תעדכן אותו לפי השרת הוא לא סתם נשאר ככה.
שלום שלום
מה יש לעדכן שם חוץ מלמחוק תסיסמא
ולרשום שם שרת ?
זה מרא האתר כזה מבולגן