Autor Zpráva
a
Profil *
problem : -(

lidi mam cesky-hosting.cz
nově včera aktivovaný

a nahral jsem tam stránky

zdrojový kod stránky

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-Strict.dtd'>
<? include "neco.php"; ?>
....
...

a na tom hostingu mám bilou obrazovku: - / a když dam zobrazit zdrojovy kod tak tam jepouze
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-Strict.dtd'>
a nic vic : - /

před minutou jsem to překopíroval z hostingu mého testovacího na pipni.cz vše vpoho a tam todle co stím? : - ( proč to dělá? muže to být tím že ještě nemám naplno rozjetý hosting? totiž ještě neuplynulo 24hodin od emailu co mi poslali že to bude ok do 24 hodin ale když už mě pustili do administrace tak jsem to tam nahrál

diky za pomoc
nightfish
Profil
zřejmě se nic neincludovalo
<? inc... bych nahradil <?php inc...
pak samozřejmě ověřit, zda-li soubor neco.php existuje
případně nastavit error_reporting na E_ALL, třeba vypíše nějakou další chybu
Ice
Profil
chvilku jim to trva nez to nazhavi, mel jsem stejny problem. PS admini jedou od deviti, tak to zkus primo na ne se zeptat jestli ti to jeste nejede.
Matěj Kloubek
Hosting cesky-hosting.cz
Profil
Zdravím
a
Možná bude problém v tom PHP. Server má zakázáno vypisování chybových hlášek. Jinak v nápovědě je popsáno jak chyby vypsat. Kdyby to nebylo ono, tak se na nás klidně obraťte. Rádi Vám pomůžeme.
a
Profil *
ale mi to na pipni jede : - /

nevim jak sjem to dal tam tak to nejede :-D
a
Profil *
přitom mám už na tom cesky-hosting jednu stránku a jede vpohodě , a na mě člověk tlačí a nevim co stím : - / dají se nějak ty chyby vypsat ikdyž je to zakázáno?
a
Profil *
nevim jako co tam je špatně mužu do toho čumět kolik chci :-D :- / ale nechapu jednu jak to muže jet jinde a tam ne : - /
a
Profil *
nejspíš ale já mám to samé i na té druhé stránce mám to standartně vytvořené a používám to všude a jen ted to nechce jet

chyba musí být někde zde

<?php
class MyLiteDb {
//connection var
var $spojeni;

//result var
var $res;

// debug mode true / false
var $debug = false;

//echo all sql queries in debug mode
var $debug_echo_all = true;

//logs errors into a file
var $log_file = true;

//type of databse
var $type = 'mysql50';

//sql query
var $sql;

//errors messages for echo
var $err_msg=array();

//prefix of tables
var $prefix='';

//construktor - connect to a database
function MyLiteDb($server = '', $user = '', $pass = '', $db = '',$typ = 'mysql40')
{
//registration of $_type var (type of database)
if($typ=='mysql41') $this->type=1; //mysqli (mysql 4.1)
elseif($typ=='sqlite') $this->type=2; //sqlite
else $this->type=0; //classic mysql (mysql40)

if ($server)
{
$this->spojeni = mysql_connect($server, $user, $pass);
if ($db)
{
mysql_select_db($db,$this->spojeni);
}
}

if($this->debug) error_reporting(E_ALL);
return $this->spojeni;
}

//for timeing
function getmicrotime(){
if($this->debug):
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
else:
return 0;
endif;
}


//this function log sql into a file
function error_log($time = NULL,$err_name){
$f = fopen('./log/sql_error.log', 'a');
//write to file - date | error message | time of query
fwrite($f, date("Y-m-d H:i:s")."\t".$this->sql."\t".$err_name."\t".$time." s\n");
fclose($f);
}


//this function handle errors
function error($time = NULL){
//Do we have to log errors?
if( (!$this->res) OR ($this->debug AND $this->debug_echo_all) ):
$err_name=mysql_error($this->spojeni); //find out error name

if(!$this->debug): //user - friendly msg
$this->err_msg[] = 'Nastala chyba p?i komunikaci s datab?z?.';
elseif($this->debug AND (!$this->res)): //debug mesage - with sql, time, error
$this->err_msg[] = 'Chyba: sql dotaz: '.$this->sql.'<br />error: '.$err_name.'<br />cas: '.$time.' s';
else: //echo all queris - with sql and time
$this->err_msg[] = 'sql: '.$this->sql.' cas: '.$time.' s';
endif;
endif;
//foreach($this->err_msg as $i=>$val) echo "$i => $val";
//log into a file?
if( (!$this->res) AND ($this->log_file) ) $this->error_log($time,$err_name);

}
function query($sql,$res_name=0){
$this->sql=$sql;

$time_start = $this->getmicrotime(); //inicializace start time

// $res = MySQL_Query($sql,$this->spojeni);
$res = mysql_query($sql);
if($res) $this->res[$res_name]=$res;

$time_end = $this->getmicrotime(); //inicialize end time
$time = $time_end - $time_start;

//error reporting
$this->error($time);
return $res;
}


function fetch_row($res_name=0){
if($this->res) return mysql_fetch_row($this->res[$res_name]);
else return false;
}

function fetch_array($res_name=0){
if($this->res) return mysql_fetch_array($this->res[$res_name]);
else return false;
}

function num_rows($res_name=0){
if($this->res[$res_name]) return mysql_num_rows($this->res[$res_name]);
else return false;
}

function fetch_object($res_name=0){
if($this->res[$res_name]) return mysql_fetch_object($this->res[$res_name]);
else return false;
}

function fetch_assoc($res_name=0){
if($this->res[$res_name]) return mysql_fetch_assoc($this->res[$res_name]);
else return false;
}

function free_result(){
if($this->res) return mysql_free_result($this->res);
else return false;
}

function num_fields(){
if($this->res) return mysql_num_fields($this->res);
else return false;
}

function affected_rows(){
return mysql_free_result($this->spojeni);

}

function fetch_field(){
if($this->res) return mysql_fetch_field($this->res);
else return false;
}

function insert_id(){
return mysql_insert_id();
}

function close(){
return mysql_close($this->spojeni);
}
//returns table name with prefix
function table_name($table){
return $this->prefix.$table;
}

//return one row -> execute query & return fetch_row
function fetch_rowo($sql){
$this->query($sql);
$zaz=$this->fetch_row();
return $zaz[0];
}

//do query + return fetch_row
function query_fetch_row($sql){
$this->query($sql);
return $this->fetch_row();
}


//do query + return fetch_array
function query_fetch_array($sql){
$res=$this->query($sql);
$ret=$this->fetch_array($res);
return $ret;
}


function sql_escape($text) {
return mysql_real_escape_string($text);

}


//function returns in array error messages
function return_errors(){
//var_dump($this->err_msg);
if($this->err_msg) return $this->err_msg;
else return array();
}

}
Matěj Kloubek
Hosting cesky-hosting.cz
Profil
a
Nejsem programátor, takže k tomu nemohu vůbec nic říci. Chyby si je možné nechat vypsat, dával jsem na tu stránku odkaz výše.
Radši se obraťte na naši podporu.
a
Profil *
bylo mi řečeno že mám použít mysqli

už mi to jede ale něco mam špatně nevypisují s emi data z Db : - / tak nevim jako
Anonymní
Profil *
nejspíše to nerozjedu na té mysql5 : - ( nevim jako přepsalsjem mysql na mysqli a mam už zobrazenou stránku ale nenačte s emi nic z db : - / myslíte žy by mě mohli hodit na servr kde je mysql4 ?
Matěj Kloubek
Hosting cesky-hosting.cz
Profil
Anonymní
To bychom samozřejmě mohli, ale řešte to prosím přímo s podporou a ne v toumo foru. Myslím, že u nás na podpoře Vám poradí lépe než já tady.
Děkuji
Toto téma je uzamčeno. Odpověď nelze zaslat.

0