Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
wp, custom page i naša slova

 
Post new topic   Reply to topic    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
Codemaster



Joined: 11 Jul 2006
Posts: 189
Location: Metkovic

PostPosted: 06.08.2011 12:17    Post subject: wp, custom page i naša slova Add user to your forum ignore list Reply with quote

Instalirao sam wp u jedan folder na siteu i u njemu mi radi sve ok. i naša slova se prikazuju i sve radi kao puška. Međutim u root folderu sam dodao custom .php file u kojem sam se spojio na bazu i iz nje čitam par zadnjih postova koji su generirani putem wp-a, međutim tu dolazi do problema sa našim slovima. umjesto čšćđž mi se prikazuju upitnici. charset je i u wp-u i u bazi i u tom php fileu utf-8. Do čega bi moglo biti

_________________
Let's play!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Gibbo



Joined: 26 Jul 2006
Posts: 17
Location: localhost

PostPosted: 06.08.2011 15:28    Post subject: Add user to your forum ignore list Reply with quote

otvori ga u notepad++ i u izborniku gore imas Encoding -> Convert to UTF-8 without BOM i onda snimi i stavi na server
Back to top
View user's profile Send private message Visit poster's website
Codemaster



Joined: 11 Jul 2006
Posts: 189
Location: Metkovic

PostPosted: 06.08.2011 16:33    Post subject: Add user to your forum ignore list Reply with quote

ma o5 sve isto......3 dana se već zezam oko ovoga... prevrtio sve tutoriale po webu i ništa ne pomaže... nemam pojma šta je..... wp je ručno instaliran, znači nije preko Fantastica i u phpmyadminu vidim da su mi i baza i tablice na utf-8 i wp je u utf-8 i taj php file u isto utf-8 without bom ali neće pa neće... prikazuje upitnike i to je to

možeš pogledati na:

http://www.ionel.hr/novosti.php

a wp je na:

http://www.ionel.hr/vijesti/

_________________
Let's play!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Gibbo



Joined: 26 Jul 2006
Posts: 17
Location: localhost

PostPosted: 06.08.2011 18:17    Post subject: Add user to your forum ignore list Reply with quote

u novosti vadiš podatke iz baze
uspostavljas vlastitu vezu s bazom, jel tako?

e prije nego postavis upit posalji ovo
mysql_query("SET NAMES UTF8;");

ako tekst nije u bazi mozes ga pretvorti u utf8 pomocu iconv

Code:
 $text = iconv("WINDOWS-1252", "UTF-8", $text)
Back to top
View user's profile Send private message Visit poster's website
Codemaster



Joined: 11 Jul 2006
Posts: 189
Location: Metkovic

PostPosted: 06.08.2011 19:16    Post subject: Add user to your forum ignore list Reply with quote

sve stavljeno ali nije do toga

_________________
Let's play!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Gibbo



Joined: 26 Jul 2006
Posts: 17
Location: localhost

PostPosted: 06.08.2011 21:23    Post subject: Add user to your forum ignore list Reply with quote

Provjeri ovo

1. baza ti mora biti utf-8 (možeš svaku kolonu također provjeriti od kud vadis podatke)
2. datoteke koj prikazuju šđčž moraju biti snimljene kao utf-8 without BOM
3. prije svih upita u bazi reci mu da radi u utf8 mysql_query("SET NAMES UTF8;");
4. html u head treba biti <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

greška ti je u nekih od ova 4 koraka

koliko vidim novosti su kodirani u WINDOWS-1252

ako hoces poslji mi podatke o serveru, u 10 minuta to sredim
Back to top
View user's profile Send private message Visit poster's website
Codemaster



Joined: 11 Jul 2006
Posts: 189
Location: Metkovic

PostPosted: 06.08.2011 22:26    Post subject: Add user to your forum ignore list Reply with quote

di vidis da su novosti kodirane na windows?

_________________
Let's play!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Codemaster



Joined: 11 Jul 2006
Posts: 189
Location: Metkovic

PostPosted: 06.08.2011 22:29    Post subject: Add user to your forum ignore list Reply with quote

aaaaaaa evo ga... riješio problem....... mysql_query("SET NAMES UTF8;"); sam upisivao poslije upita a ne prije i u tome je bio cijeli problem..... jbg... sad je sve ok...

hvala puno na pomoći

_________________
Let's play!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Gibbo



Joined: 26 Jul 2006
Posts: 17
Location: localhost

PostPosted: 06.08.2011 22:50    Post subject: Add user to your forum ignore list Reply with quote

np
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group