#PHP 改行削除したらRも消えてしまった
元
aaa bbb ccc ddd eee rrr nnn
改行削除後
aaabbbcccdddeeennn
ereg_replace("[\n|\r|\nr|\t]","",$text);
だとRも削除されてしまいました。
解決例
str_replace(array("\r\n", "\r", "\n"), '', $text);
続きを読む
Google アカウント: ログイン試行をブロックしました
でも、エラーで設定できませんでした。
「Google アカウント: ログイン試行をブロックしました」
と言うメールが届いてました。
このログイン試行がご自身によるものである場合
Google が提供するアプリ(Gmail など)に切り替えてアカウントにアクセスするか(推奨)、htt
ps://www.google.com/settings/ security/lesssecureapps で設定を変更して最新のセキュリティ標準によるアカウントの保護 を無効にすることができます。
前は、このような設定は必要なかったけど
いつからセキュリティ厳しくなったのでしょうか?
続きを読む
さくらのレンタルサーバで500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, support@sakura.ad.jp and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
単純なPHPでも500エラーになってしまいました。
PHPだけではなく、HTMLも同じく500エラーでした。
PHPが原因ではなさそうです。
他サーバーで使っていた.htaccessを使いまわしたのが原因でした。
× Options FollowSymLinks Includes
↓ 修正
○ #Options FollowSymLinks Includes
続きを読む