ユーザ用ツール

サイト用ツール

Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/e/ef98e896e48a4d30256bfef8b56c7804.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/e/ef98e896e48a4d30256bfef8b56c7804.metadata failed

よく使うphpのその2
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/e/ef98e896e48a4d30256bfef8b56c7804.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/3/3f1c1a51eaed3368199b75898a6ae75b.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/3/3f1c1a51eaed3368199b75898a6ae75b.metadata failed
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/e/ef98e896e48a4d30256bfef8b56c7804.xhtml failed

よく使うphpのその2

置換

preg_replace

 $body = preg_replace("/___REPLACE".$i."___/",trim($lineDataArray[$i]),trim($body));

preg_match

 $reg = "/<text>(.+?)<\/text>/";
 if(preg_match($reg,$valule,$d)){
 	$DetailData[$key]["text"] = $d[1];
 }

ヒアドキュメントのfunction

 function mailHead(){
 	$data =<<<DATA
 佐藤さん、安田さん
 \n
 DATA;
 	return $data;
 }

httpsからhttpに切り替えのページ表示

 $url = "http://www.enjoy-lei.com";
 $html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Refresh" content="1;URL='.$url.'">
 </head>
 <body>
 ログイン中です<br />
 数秒後にページが切り替わります<br />
 切り替わらない方は<a href="'.$url.'">こちら</a>をクリックしてください
 </body>
 </html>';
 
 echo($html);
 exit();

ページLINK Location <header>

 $url = "http://www.enjoy-lei.com";
 header("Location: ".$url);
 exit();
よく使うphpのその2.txt · 最終更新: 2013/12/03 11:19 by luis_lee