NO IMAGE

PHPバージョンによる違いか?

本日も、自宅サーバ(CentOS)で動作確認。

何とかトラブル回避できたので、覚え書き。

■PHP表示の不具合回避

20130704a現状のエンジェル21のHPを、そのまま自宅サーバ内にアップしましたが、PHPカレンダーのデータ表示がおかしくなりました。

PHPバージョンは、UbuntuServer13.04 の「5.4.9」、に対して、CentOS6.4は「5.3.3」でした。

このバージョンの違いによるものなのか、同じ.phpでも、CentOSサーバにアップした方では、fgetcsv コマンドでCSVファイルに保存したデータが正常に取り出せていないもよう。

いろいろ調べた結果、以下の2行を.phpファイルの先頭に追加。

<?php

setlocale(LC_ALL, ‘ja_JP.UTF-8’);
mb_detect_order(“SJIS-win”);
?>

20130704b結果、fgetcsv コマンドで、正常にデータを取り込めるようになり、表示も正常になりました。

・・・ひとまず、ホッ。(^^;

 

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny