1 頁 (共 1 頁)

[問題][外掛]關於論壇動態簽名的中文化 iconv 的問題

發表於 : 2004-02-04 17:49
GeniusKiKi
參考連結:http://phpbb-tw.net/phpbb/viewtopic.php?t=17313

我請我的主機商幫我安裝 iconv
他也幫我安裝好了
不過安裝好了之後
他丟給我一個路徑 /usr/bin/iconv
而不是參考連結中所說的改 php.ini
我該怎麼去把他呼叫出來使用呢\r
在官方支援論壇詢問
結果他不理我~ 一.一||

[php] /* need iconv module */
function big52uni($text) {
$rtext="";
$max=strlen($text);
for($i=0;$i<$max;$i++){
$h=ord($text[$i]);
if($h>=160 && $i<$max-1){
$rtext.="&#".base_convert(bin2hex(iconv("big5","ucs-2",
substr($text,$i,2))),16,10).";";
$i++;
}else{
$rtext.=$text[$i];
}
}
return $rtext;
}[/php]
是不是這段裡面要修改加進路徑呢?
那又要怎麼修改呢?

還有我的主機是 Linux 不是 Win 唷

發表於 : 2004-02-04 19:21
動感超人
這段:

代碼: 選擇全部

ImageTTFText($img, 9, 0, $left, $top, $text_color, "[color=red]C:/WINNT/Fonts/mingliu.ttc[/color]",big52uni("$text"));
裡面的 C:/WINNT/Fonts/mingliu.ttc 是指定字型,要自己上傳一套字型到伺服器上,然後把指向路徑改成上傳的字型。
mingliu.ttc應該是新細明體吧。 :roll:

至於路徑的話.....用這個找:
http://home.pchome.com.tw/hot/xxbbken/tools/phpenv.txt (右鍵>>另存目標,下載之後副檔名改成 .php 再上傳。)


至於您說的那段,應該不用改,env的路徑會自己抓吧。我不知道,我很嫩的,我什麼都不知道。(汗|||)圖檔

發表於 : 2004-02-04 19:23
StickyKid
吼吼~PChome塞黨集團再次出現了喔~XD
這樣是不對的行為~~XDD

發表於 : 2004-02-04 20:30
GeniusKiKi
謝謝樓上大大提供的資訊...
不過完全看不懂阿~ 汗...

http://e7play.club.tw/phpenv.php

發表於 : 2004-02-05 15:50
GeniusKiKi
主機商今天給我回信了
主機商的信件中 寫:可以使用 exec("/usr/bin/iconv","參數") 來使用 iconv.
沒錯...
你沒看錯...
就這一行而已...

有人知道我應該怎麼用嗎~ >__<

發表於 : 2004-02-05 15:59
aiken
你用這段去修改 sig...php 裡面 iconv() 那附近的程式碼試試看吧....

發表於 : 2004-02-05 16:16
GeniusKiKi
完全不懂怎麼修正~ 一.一||

發表於 : 2004-02-05 16:24
aiken
GeniusKiKi 寫:完全不懂怎麼修正~ 一.一||
我現在不在家不知道那行的寫法...
你把php檔裡面有 iconv() 那行貼出來看看
應該改那行就可以了

發表於 : 2004-02-05 16:28
GeniusKiKi
[php] /* need iconv module */
function big52uni($text) {
$rtext="";
$max=strlen($text);
for($i=0;$i<$max;$i++){
$h=ord($text[$i]);
if($h>=150 && $i<$max-1){
$rtext.="&#".base_convert(bin2hex(iconv("big5","ucs-2",
substr($text,$i,2))),16,10).";";
$i++;
}else{
$rtext.=$text[$i];
}
}
return $rtext;
}[/php]
[php]ImageTTFText($img, 9, 0, $left, $top, $text_color, "signature/DFFT-C3.TTF",big52uni("$text"));[/php]

是這兩段嗎?



還有...
愛肯叔叔...
你家論壇又掛了...

發表於 : 2004-02-05 16:33
aiken
$rtext.="&#".base_convert(bin2hex(exec("/usr/bin/iconv","big5","ucs-2",substr($text,$i,2))),16,10).";";

我完全用猜的唷~~
看會不會蝦貓碰上死號子......

我的論壇已經復活了啦~~剛剛有重開機了

有沒有人可以順便告訴我 WinVNC 會使用的port 有哪些啊
弄了好幾天都沒辦法從外面連上 WinVNC ....
我需要遠端遙控家裡的電腦啊...

發表於 : 2004-02-05 16:39
GeniusKiKi
愛肯叔叔少加一個 )
我把他改成 [php] $rtext.="&#".base_convert(bin2hex(exec("/usr/bin/iconv","big5","ucs-2",
substr($text,$i,2)))),16,10).";";[/php]
結果不行~ >__<

錯誤變成:Fatal error: Only variables can be passed by reference in /home/e7play/public_html/phpbb2/signature.php on line 15

發表於 : 2004-02-05 16:41
aiken
等待......看有沒有程式高手好死不死看到這篇可以幫你改....
哈哈......