<?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>web tips around me &#187; 技術的な話題</title>
	<atom:link href="http://yamazon.org/category/tech/feed" rel="self" type="application/rss+xml" />
	<link>http://yamazon.org</link>
	<description>iphoneアプリ開発,ホームページ制作,SEO,CMS ...</description>
	<lastBuildDate>Wed, 25 May 2011 07:58:48 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>[PHP]Cannot use object of type stdClass as array</title>
		<link>http://yamazon.org/tech/1166</link>
		<comments>http://yamazon.org/tech/1166#comments</comments>
		<pubDate>Thu, 24 Mar 2011 10:06:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術的な話題]]></category>

		<guid isPermaLink="false">http://yamazon.org/?p=1166</guid>
		<description><![CDATA[根本的な解決ではないかもしれませんが、「Cannot use object of type stdClass as array」エラーが出る場合は、配列の扱い方を以下のように変更する事で解決しました。 $row["catID"] ↓ $row->catID]]></description>
			<content:encoded><![CDATA[<p>根本的な解決ではないかもしれませんが、「Cannot use object of type stdClass as array」エラーが出る場合は、配列の扱い方を以下のように変更する事で解決しました。<br />
$row["catID"]<br />
↓<br />
$row->catID</p>
]]></content:encoded>
			<wfw:commentRss>http://yamazon.org/tech/1166/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux ユーザー一覧の確認</title>
		<link>http://yamazon.org/tech/236</link>
		<comments>http://yamazon.org/tech/236#comments</comments>
		<pubDate>Tue, 02 Feb 2010 09:03:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術的な話題]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://yamazon.org/?p=236</guid>
		<description><![CDATA[[hogehoge@localhost ~]$ cat /etc/passwd http://kazmax.zpp.jp/lin/etc_passwd.html]]></description>
			<content:encoded><![CDATA[<p>[hogehoge@localhost ~]$ cat /etc/passwd</p>
<p><a href="http://kazmax.zpp.jp/lin/etc_passwd.html">http://kazmax.zpp.jp/lin/etc_passwd.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://yamazon.org/tech/236/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>デスクトップ上のファイルの拡張子を表示させる</title>
		<link>http://yamazon.org/tech/218</link>
		<comments>http://yamazon.org/tech/218#comments</comments>
		<pubDate>Tue, 05 Jan 2010 17:15:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術的な話題]]></category>
		<category><![CDATA[拡張子]]></category>

		<guid isPermaLink="false">http://yamazon.org/?p=218</guid>
		<description><![CDATA[私の環境では、デスクトップにあるファイル（デスクトップに限らずPC上のすべてのファイル？）の拡張子が表示されない設定になっており、時々、不便に感じることもあったので、それを変更しました。 拡張子を表示させるには、以下のように設定を変更します。 XPの場合 「コントロールパネル」→「フォルダオプション」→「表示」タブをクリックし、下の詳細設定の項目から「登録されている拡張子は表示しない」のチェックを外します。 vistaの場合 「コントロールパネル」→「デスクトップのカスタマイズ」→「フォルダオプション」→「表示」タブをクリックし、詳細設定の欄から「登録されている拡張子は表示しない」のチェックを外します。]]></description>
			<content:encoded><![CDATA[<p>私の環境では、デスクトップにあるファイル（デスクトップに限らずPC上のすべてのファイル？）の拡張子が表示されない設定になっており、時々、不便に感じることもあったので、それを変更しました。</p>
<p>拡張子を表示させるには、以下のように設定を変更します。<br />
<strong>XPの場合</strong><br />
「コントロールパネル」→「フォルダオプション」→「表示」タブをクリックし、下の詳細設定の項目から「登録されている拡張子は表示しない」のチェックを外します。</p>
<p><strong>vistaの場合</strong><br />
「コントロールパネル」→「デスクトップのカスタマイズ」→「フォルダオプション」→「表示」タブをクリックし、詳細設定の欄から「登録されている拡張子は表示しない」のチェックを外します。</p>
]]></content:encoded>
			<wfw:commentRss>http://yamazon.org/tech/218/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpで処理を遅延させてから実行する。</title>
		<link>http://yamazon.org/tech/207</link>
		<comments>http://yamazon.org/tech/207#comments</comments>
		<pubDate>Fri, 25 Dec 2009 17:11:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術的な話題]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sleep]]></category>
		<category><![CDATA[処理を遅延]]></category>

		<guid isPermaLink="false">http://yamazon.org/?p=207</guid>
		<description><![CDATA[Parse error: syntax error, unexpected T_ECHO in /home/yamazon/public_html/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()&#8217;d code on line 6]]></description>
			<content:encoded><![CDATA[<p>Parse error: syntax error, unexpected T_ECHO in /home/yamazon/public_html/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()&#8217;d code on line 6</p>
]]></content:encoded>
			<wfw:commentRss>http://yamazon.org/tech/207/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mySQL上で登録された内容に一致する文字列を置き換え</title>
		<link>http://yamazon.org/tech/201</link>
		<comments>http://yamazon.org/tech/201#comments</comments>
		<pubDate>Fri, 25 Dec 2009 06:04:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術的な話題]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[置き換え]]></category>

		<guid isPermaLink="false">http://yamazon.org/?p=201</guid>
		<description><![CDATA[以下のようにSQLを実行することで該当箇所が置き換えされます。 phpのstr_replaceのような感じ。 UPDATE `テーブル名` SET フィールド名 =REPLACE (フィールド名,&#8221;置き換え前文字列&#8221;,&#8221;置き換え後文字列&#8221;);]]></description>
			<content:encoded><![CDATA[<p>以下のようにSQLを実行することで該当箇所が置き換えされます。<br />
phpのstr_replaceのような感じ。</p>
<p>UPDATE `テーブル名`  SET フィールド名 =REPLACE (フィールド名,&#8221;置き換え前文字列&#8221;,&#8221;置き換え後文字列&#8221;);</p>
]]></content:encoded>
			<wfw:commentRss>http://yamazon.org/tech/201/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE・FireFoxで使えるお気に入りボタン（ブックマークボタン）</title>
		<link>http://yamazon.org/tech/190</link>
		<comments>http://yamazon.org/tech/190#comments</comments>
		<pubDate>Tue, 08 Dec 2009 18:57:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術的な話題]]></category>
		<category><![CDATA[お気に入りボタン]]></category>
		<category><![CDATA[ホームページ制作]]></category>

		<guid isPermaLink="false">http://yamazon.org/?p=190</guid>
		<description><![CDATA[&#60;script type=&#8221;text/javascript&#8221;&#62; &#60;!&#8211; if(navigator.userAgent.indexOf(&#8220;MSIE&#8221;) &#62; -1){ //Internet Explorer document.write(&#8216;&#60;!-&#8217;+'-[if IE]&#62;&#8217;); document.write(&#8216;&#60;input type=&#8221;button&#8221; value=&#8221;お気に入りに追加&#8220;&#8216;); document.write(&#8216; onclick=&#8221;window.external.AddFavorite(\&#8217;サイトURL\&#8217;,\&#8217;サイト名\&#8217;)&#8221;&#62;&#8217;); document.write(&#8216;&#60;![endif]-&#8217;+'-&#62;&#8217;); } else if(navigator.userAgent.indexOf(&#8220;Firefox&#8221;) &#62; -1){ //Firefox document.write(&#8216;&#60;input type=&#8221;button&#8221; value=&#8221;ブックマークに追加&#8220;&#8216;); document.write(&#8216; onclick=&#8221;window.sidebar.addPanel(\&#8217;サイト名\&#8217;,\&#8217;サイトURL\&#8217;,\&#8217;\');&#8221;&#62;&#8217;); } else if(navigator.userAgent.indexOf(&#8220;Opera&#8221;) &#62; -1){ //Opera document.write(&#8216;&#60;a href=&#8221;サイトURL&#8221; rel=&#8221;sidebar&#8221; title=&#8221;サイト名&#8220;&#62;ブックマークに追加&#60;/a&#62;&#8217;); } else { //該当なし void(0); //何もしない } //&#8211;&#62; &#60;/script&#62;]]></description>
			<content:encoded><![CDATA[<p>&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
&lt;!&#8211;<br />
if(navigator.userAgent.indexOf(&#8220;MSIE&#8221;) &gt; -1){ //Internet Explorer<br />
document.write(&#8216;&lt;!-&#8217;+'-[if IE]&gt;&#8217;);<br />
document.write(&#8216;&lt;input type=&#8221;button&#8221; value=&#8221;<span style="color: #0000ff;">お気に入りに追加</span>&#8220;&#8216;);<br />
document.write(&#8216; onclick=&#8221;window.external.AddFavorite(\&#8217;<span style="color: #ff0000;">サイトURL</span>\&#8217;,\&#8217;<span style="color: #ff0000;">サイト名</span>\&#8217;)&#8221;&gt;&#8217;);<br />
document.write(&#8216;&lt;![endif]-&#8217;+'-&gt;&#8217;);<br />
}</p>
<p>else if(navigator.userAgent.indexOf(&#8220;Firefox&#8221;) &gt; -1){ //Firefox<br />
document.write(&#8216;&lt;input type=&#8221;button&#8221; value=&#8221;<span style="color: #0000ff;">ブックマークに追加</span>&#8220;&#8216;);<br />
document.write(&#8216; onclick=&#8221;window.sidebar.addPanel(\&#8217;<span style="color: #ff0000;">サイト名</span>\&#8217;,\&#8217;<span style="color: #ff0000;">サイトURL</span>\&#8217;,\&#8217;\');&#8221;&gt;&#8217;);<br />
}</p>
<p>else if(navigator.userAgent.indexOf(&#8220;Opera&#8221;) &gt; -1){ //Opera<br />
document.write(&#8216;&lt;a href=&#8221;<span style="color: #ff0000;">サイトURL</span>&#8221; rel=&#8221;sidebar&#8221; title=&#8221;<span style="color: #ff0000;">サイト名</span>&#8220;&gt;<span style="color: #0000ff;">ブックマークに追加</span>&lt;/a&gt;&#8217;);<br />
}</p>
<p>else { //該当なし<br />
void(0); //何もしない<br />
}<br />
//&#8211;&gt;<br />
&lt;/script&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://yamazon.org/tech/190/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php Fatal error: Cannot redeclare phpでのエラー</title>
		<link>http://yamazon.org/tech/187</link>
		<comments>http://yamazon.org/tech/187#comments</comments>
		<pubDate>Mon, 07 Dec 2009 12:34:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術的な話題]]></category>

		<guid isPermaLink="false">http://yamazon.org/?p=187</guid>
		<description><![CDATA[今回RSSを取り出すのに使っていた「MagpieRSS」を以下のように使っていたのですが、 include (&#8216;rss_fetch.inc&#8217;); require_once &#8216;code_table.ucs2jis&#8217;; require_once &#8216;jcode.php&#8217;; 繰り返し処理を行おうとしたところ、Fatal error: Cannot redeclare phpでのエラーとういうエラーが出現するので、以下のように修正したら、とりあえず動くようになりました。 ちゃんとした解決策なのかどうかは不明ですが・・・( ; ﾟДﾟ) require_once (&#8216;rss_fetch.inc&#8217;); require_once &#8216;code_table.ucs2jis&#8217;; require_once &#8216;jcode.php&#8217;;]]></description>
			<content:encoded><![CDATA[<p>今回RSSを取り出すのに使っていた「MagpieRSS」を以下のように使っていたのですが、</p>
<p><span style="color: #ff0000;">include (&#8216;rss_fetch.inc&#8217;);</span><br />
require_once &#8216;code_table.ucs2jis&#8217;;<br />
require_once &#8216;jcode.php&#8217;;</p>
<p>繰り返し処理を行おうとしたところ、Fatal error: Cannot redeclare phpでのエラーとういうエラーが出現するので、以下のように修正したら、とりあえず動くようになりました。</p>
<p>ちゃんとした解決策なのかどうかは不明ですが・・・( ; ﾟДﾟ)</p>
<p><span style="color: #ff0000;">require_once (&#8216;rss_fetch.inc&#8217;);</span><br />
require_once &#8216;code_table.ucs2jis&#8217;;<br />
require_once &#8216;jcode.php&#8217;;</p>
]]></content:encoded>
			<wfw:commentRss>http://yamazon.org/tech/187/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php　配列の要素から重複を削除し、添え字を再配布する</title>
		<link>http://yamazon.org/tech/183</link>
		<comments>http://yamazon.org/tech/183#comments</comments>
		<pubDate>Mon, 07 Dec 2009 10:16:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術的な話題]]></category>
		<category><![CDATA[array_unique]]></category>
		<category><![CDATA[array_values]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[再配布]]></category>
		<category><![CDATA[添え字]]></category>
		<category><![CDATA[配列]]></category>

		<guid isPermaLink="false">http://yamazon.org/?p=183</guid>
		<description><![CDATA[$example_array= array( "green", "red", "green", "blue", "red"); phpで上記のような配列から、重複要素を削除するには $example_array = array_unique($example_array); とすることで重複要素は削除されます。 このままだと Array ( [0] =&#62; green [1] =&#62; red [3] =&#62; blue ) のように重複を削除した箇所は添え字も削除され、添え字が飛び飛びになってしまいます。 これを添え字も以下のように、順番通りにしたい場合はarray_values関数を使います。 Array ( [0] =&#62; green [1] =&#62; red [2] =&#62; blue ) $example_array = array_values($example_array); とすることで添え字が再配布されます。]]></description>
			<content:encoded><![CDATA[<p><code><span style="color: #000000;"><span style="color: #0000bb;">$</span></span></code>example_array<code><span style="color: #000000;"><span style="color: #007700;">= array(</span><span style="color: #007700;"> </span><span style="color: #dd0000;">"green"</span><span style="color: #007700;">, </span><span style="color: #dd0000;">"red"</span><span style="color: #007700;">, </span><span style="color: #dd0000;">"green"</span><span style="color: #007700;">, </span><span style="color: #dd0000;">"blue"</span><span style="color: #007700;">, </span><span style="color: #dd0000;">"red"</span><span style="color: #007700;">);</span></span></code></p>
<p>phpで上記のような配列から、重複要素を削除するには</p>
<p>$example_array = array_unique($example_array);</p>
<p>とすることで重複要素は削除されます。</p>
<p><span id="more-183"></span></p>
<p>このままだと</p>
<pre>Array
(
    [0] =&gt; green
    [1] =&gt; red
    <span style="color: #ff0000;">[3]</span> =&gt; blue
)
のように重複を削除した箇所は添え字も削除され、添え字が飛び飛びになってしまいます。

これを添え字も以下のように、順番通りにしたい場合はarray_values関数を使います。
<pre>Array
(
    [0] =&gt; green
    [1] =&gt; red
    <span style="color: #ff0000;">[2]</span> =&gt; blue
)

$example_array = array_values($example_array);

とすることで添え字が再配布されます。</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://yamazon.org/tech/183/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php　配列に要素を追加する</title>
		<link>http://yamazon.org/tech/181</link>
		<comments>http://yamazon.org/tech/181#comments</comments>
		<pubDate>Sat, 05 Dec 2009 21:13:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術的な話題]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[配列]]></category>

		<guid isPermaLink="false">http://yamazon.org/?p=181</guid>
		<description><![CDATA[&#60;?php $array[] = $var; ?&#62; $array に　要素$varが次々に追加されていく。]]></description>
			<content:encoded><![CDATA[<div>
<div><code><span style="color: #000000;"> <span style="color: #0000bb;">&lt;?php<br />
$array</span><span style="color: #007700;">[] = </span><span style="color: #0000bb;">$var</span><span style="color: #007700;">;<br />
</span><span style="color: #0000bb;">?&gt;</span></span></code></div>
<div></div>
<div><span style="color: #000000;"><span style="color: #0000bb;">$array に　要素$varが次々に追加されていく。<br />
</span></span></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://yamazon.org/tech/181/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>外部のサイトから画像をサーバに取得（コピー）</title>
		<link>http://yamazon.org/tech/178</link>
		<comments>http://yamazon.org/tech/178#comments</comments>
		<pubDate>Sat, 05 Dec 2009 18:55:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技術的な話題]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://yamazon.org/?p=178</guid>
		<description><![CDATA[$img_path　// 取得する画像のパス(URL) $path = &#8220;ここは保存先のパス&#8221;;  //  /home/ドメイン/public_html/imagesなど $img = file_get_contents($img_path) ;//画像を取得 $fullpath = $path.basename($img_path);//画像の保存フルパス file_put_contents($fullpath, $img);//保存。 *basename &#62;&#62; パス中のファイル名の部分を返す]]></description>
			<content:encoded><![CDATA[<p>$img_path　// 取得する画像のパス(URL)</p>
<p>$path = &#8220;ここは保存先のパス&#8221;;  //  /home/ドメイン/public_html/imagesなど</p>
<p>$img = file_get_contents($img_path) ;//画像を取得</p>
<p>$fullpath = $path.basename($img_path);//画像の保存フルパス</p>
<p>file_put_contents($fullpath, $img);//保存。</p>
<p>*basename &gt;&gt; <a onmousedown="return rwt(this,'','','res','1','AFQjCNHWuC7MgbSwM-QF7JgeE72IyKBwTw','&amp;sig2=YndcjLnq6Mx_UliagcxJuQ','0CAsQFjAA')" href="http://www.phppro.jp/basename">パス中のファイル名の部分を返す</a></p>
]]></content:encoded>
			<wfw:commentRss>http://yamazon.org/tech/178/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

