<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gototake blog &#187; PHP</title>
	<atom:link href="http://blog.gototake.com/?cat=3&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.gototake.com</link>
	<description>自分用メモ</description>
	<lastBuildDate>Mon, 21 Nov 2016 12:04:51 +0000</lastBuildDate>
	<language>ja</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8.1</generator>
	<item>
		<title>PHP 時間でリンク先変更</title>
		<link>http://blog.gototake.com/?p=43</link>
		<comments>http://blog.gototake.com/?p=43#comments</comments>
		<pubDate>Wed, 02 Apr 2014 03:11:11 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.gototake.com/?p=43</guid>
		<description><![CDATA[1 2 3 4 5 6 7 8 9 10 11 $now = strtotime&#40;date&#40;' [&#8230;]]]></description>
				<content:encoded><![CDATA[<style type="text/css">
.bwp-syntax-wrapper li {white-space: normal;}
</style>
<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar">
<div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a></div>
</div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple">
<table class="php">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
2
3
4
5
6
7
8
9
10
11
</pre>
</td>
<td class="de1">
<pre class="de1"><span class="re0">$now</span> <span class="sy0">=</span> <span class="kw3">strtotime</span><span class="br0">&#40;</span><span class="kw3">date</span><span class="br0">&#40;</span><span class="st_h">'Y-m-d H:i:s'</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="re0">$mainteStart</span> <span class="sy0">=</span> <span class="kw3">strtotime</span><span class="br0">&#40;</span><span class="st0">&quot;2014-4-2 09:00:00&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="re0">$mainteEnd</span> <span class="sy0">=</span> <span class="kw3">strtotime</span><span class="br0">&#40;</span><span class="st0">&quot;2014-4-2 18:00:00&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$now</span><span class="sy0">&lt;</span><span class="re0">$mainteStart</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp; &nbsp; <span class="re0">$reserveLink</span><span class="sy0">=</span><span class="st0">&quot;https://aaaaa&quot;</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="kw1">elseif</span><span class="br0">&#40;</span><span class="re0">$now</span><span class="sy0">&lt;</span><span class="re0">$mainteEnd</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp; &nbsp; <span class="re0">$reserveLink</span><span class="sy0">=</span><span class="st0">&quot;http://bbbbbb&quot;</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span>
&nbsp; &nbsp; <span class="re0">$reserveLink</span><span class="sy0">=</span><span class="st0">&quot;http://ccccccc&quot;</span><span class="sy0">;</span>
<span class="br0">&#125;</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="bwp-syntax-source">
<pre class="no-parse">$now = strtotime(date('Y-m-d H:i:s'));
$mainteStart = strtotime("2014-4-2 09:00:00");
$mainteEnd = strtotime("2014-4-2 18:00:00");

if($now&lt;$mainteStart){
	$reserveLink="https://aaaaa";
}elseif($now&lt;$mainteEnd){
	$reserveLink="http://bbbbbb";
}else{
	$reserveLink="http://ccccccc";
}</pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.gototake.com/?feed=rss2&#038;p=43</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>正規表現 .を改行にもマッチさせる preg</title>
		<link>http://blog.gototake.com/?p=24</link>
		<comments>http://blog.gototake.com/?p=24#comments</comments>
		<pubDate>Mon, 31 Mar 2014 11:37:28 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.gototake.com/?p=24</guid>
		<description><![CDATA[通常 . は改行にマッチせず。 /s で、マッチするようになる]]></description>
				<content:encoded><![CDATA[<p>通常<br />
.<br />
は改行にマッチせず。<br />
/s<br />
で、マッチするようになる</p>
<style type="text/css">
.bwp-syntax-wrapper li {white-space: normal;}
</style>
<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar">
<div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a></div>
</div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple">
<table class="php">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
</pre>
</td>
<td class="de1">
<pre class="de1"><span class="re0">$ptn</span><span class="sy0">=</span><span class="st0">&quot;/abc.*xyz/s&quot;</span><span class="sy0">;</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="bwp-syntax-source">
<pre class="no-parse">$ptn="/abc.*xyz/s";</pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.gototake.com/?feed=rss2&#038;p=24</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
