php: Zelan jakin textue utf-8 badauen?

Eskerrak geure psicologo programadorieri: http://php.apsique.com/node/536 Neure kasuen bakarrik biher dot ia utf-8 badan, orduen ba kodigo zati bat bakarrik hartun got: function is_utf8($text) { $result = false; for($i=0; $i<strlen($text); $i++) { $byte = ord($text[$i]); if ($byte & 0x80) $result = true; } return $result; }

Karactere berezidxek XML baten gorde UTF-8 encoding-egaz

Oingutan pasa dast karaktere berezidxek HTML hexadezimal formatora: &xYY; pasatie eta ezta nahikue entza new DOMDocument(‘1.0’, ‘utf-8’); eitzie Derrigorrezkue da encoding-e loadXML eta gero eitzie ;) $dom = new DOMDocument(‘1.0’, ‘utf-8’); $dom->loadXML($data); $dom->encoding = ‘utf-8’; header(‘Content-type: text/html; charset=utf-8’); echo $dom->saveXML();

CodeIgniter datu basiekaz konekta: oracle eta mysql

database.php … $active_group = “default”; $active_record = TRUE; $db[‘oracle’][‘hostname’] = ‘(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.1)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = DATUBASIEN_IZENA)))’; $db[‘oracle’][‘username’] = “ERABILTZAILEA”; $db[‘oracle’][‘password’] = “PASAHITZA”; $db[‘oracle’][‘database’] = “”; $db[‘oracle’][‘dbdriver’] = “oci8”; $db[‘oracle’][‘dbprefix’] = “”; $db[‘oracle’][‘pconnect’] = TRUE; $db[‘oracle’][‘db_debug’] = TRUE; $db[‘oracle’][‘cache_on’] = FALSE; $db[‘oracle’][‘cachedir’] = “”; //$db[‘oracle’][‘char_set’] = “utf8”; […]

Zelan erabili php plantillekaz bihar eitzeko

<?php $a = array(1, 2, 3, 4); $b = 10; ?> <h1>PHP templates</h1> <ul> <?php foreach($a as $value): ?> <li><?=$value?></li> <?php endforeach ?> </ul> <?php if($b<10): ?> b hamar baño txikidxaue da: <?=$b?> <?php elseif($b==10): ?> b hamar da: <?=$b?> <?php else : ?> b hamar baño handidxaue da: <?=$b?> <?php endif ?>

php + oci8 Oracle bezero (kliente) moduen imintzeko gnu/linux-en

Aupatxo bueno ba debian-en eta gero archlinux-en inbizandoten oracle klientie instala baie edozein gnu/linux distribuziñuentzako balidxo dauela pentsaten dot: 1.- yaourt instala: Edite: /etc/pacman.d/mirrorlist eta hurrengo textue sartun x86-ntzako [archlinuxfr] Server = http://repo.archlinux.fr/i686 x86_64-ntzako [archlinuxfr] Server = http://repo.archlinux.fr/x86_64 eta gorde, oin: $ su # pacman -Syy # pacman -S yaourt # exit 2.- libaio instala: […]