<?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>@blog.justoneplanet.info</title>
	<atom:link href="http://blog.justoneplanet.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.justoneplanet.info</link>
	<description>JavaScript、PHP、MySQLを使ったり</description>
	<lastBuildDate>Tue, 02 Mar 2010 15:57:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>画像のオリジナルサイズをJavaScriptで取得する</title>
		<link>http://blog.justoneplanet.info/2010/03/03/%e7%94%bb%e5%83%8f%e3%81%ae%e3%82%aa%e3%83%aa%e3%82%b8%e3%83%8a%e3%83%ab%e3%82%b5%e3%82%a4%e3%82%ba%e3%82%92javascript%e3%81%a7%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/</link>
		<comments>http://blog.justoneplanet.info/2010/03/03/%e7%94%bb%e5%83%8f%e3%81%ae%e3%82%aa%e3%83%aa%e3%82%b8%e3%83%8a%e3%83%ab%e3%82%b5%e3%82%a4%e3%82%ba%e3%82%92javascript%e3%81%a7%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 15:57:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.justoneplanet.info/?p=2425</guid>
		<description><![CDATA[getNaturalSizeにimageオブジェクトを投げてあげるとオブジェクトが返る。

var cache = [];
var getNaturalSize = (function(){
    if(Image.naturalWidth &#124;&#124; Image.naturalHeight){
        return function(image){
            return {
                &#34;width&#34;  : image.naturalWidth,
   [...]]]></description>
			<content:encoded><![CDATA[<p>getNaturalSizeにimageオブジェクトを投げてあげるとオブジェクトが返る。</p>
<pre class="brush: jscript;">
var cache = [];
var getNaturalSize = (function(){
    if(Image.naturalWidth || Image.naturalHeight){
        return function(image){
            return {
                &quot;width&quot;  : image.naturalWidth,
                &quot;height&quot; : image.naturalHeight
            };
        }
    }
    else if(window.opera){
        return function(image){
            if(!cache[image.src]){
                var mem = {
                    &quot;w&quot;: image.width,
                    &quot;h&quot;: image.height
                };
                image.removeAttribute(&quot;width&quot;);
                image.removeAttribute(&quot;height&quot;);
                w = image.width;
                h = image.height;
                image.width = mem.w;
                image.height = mem.h;
                cache[image.src] = {
                    &quot;width&quot;  : w,
                    &quot;height&quot; : h
                };
            }
            return cache[image.src];
        };
    }
    else if(window.attachEvent){
        return function(image){
            if (image[key] &amp;&amp; image[key].src === image.src) {
                return image[key];
            }
            run = image.runtimeStyle;
            mem = {
                &quot;w&quot; : run.width,
                &quot;h&quot; : run.height
            }; // keep runtimeStyle
            run.width  = &quot;auto&quot;; // override
            run.height = &quot;auto&quot;;
            w = image.width;
            h = image.height;
            run.width  = mem.w; // restore
            run.height = mem.h;
            image[key] = {
                &quot;width&quot;  : w,
                &quot;height&quot; : h,
                &quot;src&quot;    : image.src
            };
            return image[key]; // bond
        }
    }
    else{
        return function(image){
            return {
                &quot;width&quot;  : 100,
                &quot;height&quot; : 100
            };
        }
    }
})();
</pre>
<p>Firefox、IE6~8、Chrome、Operaで動作する。Safari未検証。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justoneplanet.info/2010/03/03/%e7%94%bb%e5%83%8f%e3%81%ae%e3%82%aa%e3%83%aa%e3%82%b8%e3%83%8a%e3%83%ab%e3%82%b5%e3%82%a4%e3%82%ba%e3%82%92javascript%e3%81%a7%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>スクロール位置を取得する</title>
		<link>http://blog.justoneplanet.info/2010/02/22/%e3%82%b9%e3%82%af%e3%83%ad%e3%83%bc%e3%83%ab%e4%bd%8d%e7%bd%ae%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/</link>
		<comments>http://blog.justoneplanet.info/2010/02/22/%e3%82%b9%e3%82%af%e3%83%ad%e3%83%bc%e3%83%ab%e4%bd%8d%e7%bd%ae%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 18:19:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.justoneplanet.info/?p=2423</guid>
		<description><![CDATA[
var scrollTop = document.documentElement.scrollTop &#124;&#124; document.body.scrollTop;// ex) 100(px)

]]></description>
			<content:encoded><![CDATA[<pre class="brush: jscript;">
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;// ex) 100(px)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.justoneplanet.info/2010/02/22/%e3%82%b9%e3%82%af%e3%83%ad%e3%83%bc%e3%83%ab%e4%bd%8d%e7%bd%ae%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Zend_Controller_Router_Route_Regexで正規表現によるルーティング設定を行う</title>
		<link>http://blog.justoneplanet.info/2010/02/22/zend_controller_router_route_regex%e3%81%a7%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%ab%e3%82%88%e3%82%8b%e3%83%ab%e3%83%bc%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0%e8%a8%ad%e5%ae%9a%e3%82%92%e8%a1%8c/</link>
		<comments>http://blog.justoneplanet.info/2010/02/22/zend_controller_router_route_regex%e3%81%a7%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%ab%e3%82%88%e3%82%8b%e3%83%ab%e3%83%bc%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0%e8%a8%ad%e5%ae%9a%e3%82%92%e8%a1%8c/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 16:35:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ZendFramework]]></category>

		<guid isPermaLink="false">http://blog.justoneplanet.info/?p=2420</guid>
		<description><![CDATA[以下のように、Zend_Controller_Router_Route_Regexを使用する。

$front-&#62;getRouter()-&#62;addRoute(
	'page',
	new Zend_Contr [...]]]></description>
			<content:encoded><![CDATA[<p>以下のように、Zend_Controller_Router_Route_Regexを使用する。</p>
<pre class="brush: php;">
$front-&gt;getRouter()-&gt;addRoute(
	'page',
	new Zend_Controller_Router_Route_Regex(
		'page_(\d+)\.html',
		array(
			'controller' =&gt; 'Index',
			'action'     =&gt; 'page'
		),
		array(
			1 =&gt; 'pageid'
		)
	)
);
</pre>
<p>Actionからは以下のコードでマッチした部分を参照できる。</p>
<pre class="brush: php;">
$this-&gt;_getParam('pageid');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.justoneplanet.info/2010/02/22/zend_controller_router_route_regex%e3%81%a7%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%ab%e3%82%88%e3%82%8b%e3%83%ab%e3%83%bc%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0%e8%a8%ad%e5%ae%9a%e3%82%92%e8%a1%8c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ファイルの所有者を変更する</title>
		<link>http://blog.justoneplanet.info/2010/02/22/%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%ae%e6%89%80%e6%9c%89%e8%80%85%e3%82%92%e5%a4%89%e6%9b%b4%e3%81%99%e3%82%8b/</link>
		<comments>http://blog.justoneplanet.info/2010/02/22/%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%ae%e6%89%80%e6%9c%89%e8%80%85%e3%82%92%e5%a4%89%e6%9b%b4%e3%81%99%e3%82%8b/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 16:19:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.justoneplanet.info/?p=2418</guid>
		<description><![CDATA[/home/user/directory配下のファイルの所有者を全てftp_userにする。

chown -R ftp_user  /home/user/directory

]]></description>
			<content:encoded><![CDATA[<p>/home/user/directory配下のファイルの所有者を全てftp_userにする。</p>
<pre class="brush: bash;">
chown -R ftp_user  /home/user/directory
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.justoneplanet.info/2010/02/22/%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%ae%e6%89%80%e6%9c%89%e8%80%85%e3%82%92%e5%a4%89%e6%9b%b4%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPからドメインを取得する</title>
		<link>http://blog.justoneplanet.info/2010/02/22/php%e3%81%8b%e3%82%89%e3%83%89%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/</link>
		<comments>http://blog.justoneplanet.info/2010/02/22/php%e3%81%8b%e3%82%89%e3%83%89%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 15:18:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.justoneplanet.info/?p=2416</guid>
		<description><![CDATA[
var_dump($_SERVER['SERVER_NAME']);
//string(16) &#34;sample.org&#34;

マルチドメイン、シングルホスティングの時には使いそうだ。
]]></description>
			<content:encoded><![CDATA[<pre class="brush: php;">
var_dump($_SERVER['SERVER_NAME']);
//string(16) &quot;sample.org&quot;
</pre>
<p>マルチドメイン、シングルホスティングの時には使いそうだ。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justoneplanet.info/2010/02/22/php%e3%81%8b%e3%82%89%e3%83%89%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQLのrootパスワードを設定する</title>
		<link>http://blog.justoneplanet.info/2010/02/22/mysql%e3%81%aeroot%e3%83%91%e3%82%b9%e3%83%af%e3%83%bc%e3%83%89%e3%82%92%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b/</link>
		<comments>http://blog.justoneplanet.info/2010/02/22/mysql%e3%81%aeroot%e3%83%91%e3%82%b9%e3%83%af%e3%83%bc%e3%83%89%e3%82%92%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 15:03:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.justoneplanet.info/?p=2412</guid>
		<description><![CDATA[インストール直後は何もパスワードが設定されていないので注意すること！

SET PASSWORD FOR root@localhost=PASSWORD('password');

]]></description>
			<content:encoded><![CDATA[<p>インストール直後は何もパスワードが設定されていないので注意すること！</p>
<pre class="brush: sql;">
SET PASSWORD FOR root@localhost=PASSWORD('password');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.justoneplanet.info/2010/02/22/mysql%e3%81%aeroot%e3%83%91%e3%82%b9%e3%83%af%e3%83%bc%e3%83%89%e3%82%92%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sshのrootログインを禁止する</title>
		<link>http://blog.justoneplanet.info/2010/02/19/ssh%e3%81%aeroot%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%82%92%e7%a6%81%e6%ad%a2%e3%81%99%e3%82%8b/</link>
		<comments>http://blog.justoneplanet.info/2010/02/19/ssh%e3%81%aeroot%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%82%92%e7%a6%81%e6%ad%a2%e3%81%99%e3%82%8b/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 17:10:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.justoneplanet.info/?p=2407</guid>
		<description><![CDATA[
vi /etc/ssh/sshd_config

以下のオプションをnoにしてあげる。

PermitRootLogin  no

]]></description>
			<content:encoded><![CDATA[<pre class="brush: bash;">
vi /etc/ssh/sshd_config
</pre>
<p>以下のオプションをnoにしてあげる。</p>
<pre class="brush: bash;">
PermitRootLogin  no
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.justoneplanet.info/2010/02/19/ssh%e3%81%aeroot%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%82%92%e7%a6%81%e6%ad%a2%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>特定のユーザにmysqlリモート接続を許可する</title>
		<link>http://blog.justoneplanet.info/2010/02/19/%e7%89%b9%e5%ae%9a%e3%81%ae%e3%83%a6%e3%83%bc%e3%82%b6%e3%81%abmysql%e3%83%aa%e3%83%a2%e3%83%bc%e3%83%88%e6%8e%a5%e7%b6%9a%e3%82%92%e8%a8%b1%e5%8f%af%e3%81%99%e3%82%8b/</link>
		<comments>http://blog.justoneplanet.info/2010/02/19/%e7%89%b9%e5%ae%9a%e3%81%ae%e3%83%a6%e3%83%bc%e3%82%b6%e3%81%abmysql%e3%83%aa%e3%83%a2%e3%83%bc%e3%83%88%e6%8e%a5%e7%b6%9a%e3%82%92%e8%a8%b1%e5%8f%af%e3%81%99%e3%82%8b/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 17:07:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[デフォルト]]></category>

		<guid isPermaLink="false">http://blog.justoneplanet.info/?p=2404</guid>
		<description><![CDATA[その前にポート3306は初期状態では閉じられているので開ける。

iptables -I INPUT -j ACCEPT -p tcp -s x.x.x.x --dport 3306

IPはクライアント側のIP。このI [...]]]></description>
			<content:encoded><![CDATA[<p>その前にポート3306は初期状態では閉じられているので開ける。</p>
<pre class="brush: bash;">
iptables -I INPUT -j ACCEPT -p tcp -s x.x.x.x --dport 3306
</pre>
<p>IPはクライアント側のIP。このIPからだけ接続できる。192.168.1.%のようにワイルドカードも使えるがセキュリティには注意しなくてはならない。</p>
<pre class="brush: bash;">
GRANT ALL PRIVILEGES ON *.* to user@'192.168.1.1' IDENTIFIED BY 'password';
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.justoneplanet.info/2010/02/19/%e7%89%b9%e5%ae%9a%e3%81%ae%e3%83%a6%e3%83%bc%e3%82%b6%e3%81%abmysql%e3%83%aa%e3%83%a2%e3%83%bc%e3%83%88%e6%8e%a5%e7%b6%9a%e3%82%92%e8%a8%b1%e5%8f%af%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FTP用ユーザのディレクトリを制限する</title>
		<link>http://blog.justoneplanet.info/2010/02/19/ftp%e7%94%a8%e3%83%a6%e3%83%bc%e3%82%b6%e3%81%ae%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%88%e3%83%aa%e3%82%92%e5%88%b6%e9%99%90%e3%81%99%e3%82%8b/</link>
		<comments>http://blog.justoneplanet.info/2010/02/19/ftp%e7%94%a8%e3%83%a6%e3%83%bc%e3%82%b6%e3%81%ae%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%88%e3%83%aa%e3%82%92%e5%88%b6%e9%99%90%e3%81%99%e3%82%8b/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 17:03:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.justoneplanet.info/?p=2402</guid>
		<description><![CDATA[■vsftpの場合

vi /etc/vsftpd/vsftpd.conf

chroot_list_enableとchroot_list_fileの記述を以下のように修正する。

chroot_list_enable= [...]]]></description>
			<content:encoded><![CDATA[<h3>■vsftpの場合</h3>
<pre class="brush: bash;">
vi /etc/vsftpd/vsftpd.conf
</pre>
<p>chroot_list_enableとchroot_list_fileの記述を以下のように修正する。</p>
<pre class="brush: bash;">
chroot_list_enable=YES
chroot_list_file=/etc/vsftpdd.chroot_list
</pre>
<pre class="brush: bash;">
vi /etc/vsftpd/vsftpd.conf
</pre>
<p>ファイルに制限したいユーザ名を書く。</p>
<pre class="brush: bash;">
ftp_user
</pre>
<p>再起動を忘れずに。</p>
<pre class="brush: bash;">
/etc/init.d/vsftpd restart
</pre>
<p>ftp_userがホームディレクトリより上にいけなくなる。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justoneplanet.info/2010/02/19/ftp%e7%94%a8%e3%83%a6%e3%83%bc%e3%82%b6%e3%81%ae%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%88%e3%83%aa%e3%82%92%e5%88%b6%e9%99%90%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ZendFrameworkでコマンドラインからアクションを実行する</title>
		<link>http://blog.justoneplanet.info/2010/02/14/zendframework%e3%81%a7%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%83%a9%e3%82%a4%e3%83%b3%e3%81%8b%e3%82%89%e3%82%a2%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e3%82%92%e5%ae%9f%e8%a1%8c%e3%81%99%e3%82%8b/</link>
		<comments>http://blog.justoneplanet.info/2010/02/14/zendframework%e3%81%a7%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%83%a9%e3%82%a4%e3%83%b3%e3%81%8b%e3%82%89%e3%82%a2%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e3%82%92%e5%ae%9f%e8%a1%8c%e3%81%99%e3%82%8b/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 14:56:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ZendFramework]]></category>

		<guid isPermaLink="false">http://blog.justoneplanet.info/?p=2394</guid>
		<description><![CDATA[コマンドラインにおけるオプションの設定・取得。&#124;の後がエイリアス名、=の後の文字列で型を指定できる。

try {
    $options = new Zend_Console_Getopt(
        arra [...]]]></description>
			<content:encoded><![CDATA[<p>コマンドラインにおけるオプションの設定・取得。|の後がエイリアス名、=の後の文字列で型を指定できる。</p>
<pre class="brush: php;">
try {
    $options = new Zend_Console_Getopt(
        array(
            'help|h'        =&gt; 'help.',
            'zfm|m=s'       =&gt; 'module',
            'zfc|c=s'       =&gt; 'controller',
            'zfa|a=s'       =&gt; 'action'
        )
    );
    $options-&gt;parse();
}
catch(Zend_Console_Getopt_Exception $e){
    die($e-&gt;getMessage() . ' : ' . $e-&gt;getUsageMessage());
}
</pre>
<p>Zend_Controller_Request_Simpleがポイント。アクション、コントローラ、モジュールを引数に指定してリクエストオブジェクトを取得する。</p>
<pre class="brush: php;">
if(isset($options-&gt;zfa) &amp;&amp; isset($options-&gt;zfc) &amp;&amp; isset($options-&gt;zfm)){
    $request = new Zend_Controller_Request_Simple(
        $options-&gt;zfa,
        $options-&gt;zfc,
        $options-&gt;zfm
    );
    $front = Zend_Controller_Front::getInstance();
    $front-&gt;setRequest($request);
    $front-&gt;setRouter(new Custom_Controller_Router_Cli());
    $front-&gt;setResponse(new Zend_Controller_Response_Cli());
    $front-&gt;throwExceptions(true);
    $front-&gt;addModuleDirectory(dirname(__FILE__) . '/application/modules');
    $front-&gt;dispatch();
}
</pre>
<p>Custom_Controller_Router_Cliはこんな感じ。</p>
<pre class="brush: php;">
&lt;?php
require_once 'Zend/Controller/Router/Interface.php';
require_once 'Zend/Controller/Router/Abstract.php';

class Custom_Controller_Router_Cli extends Zend_Controller_Router_Abstract implements Zend_Controller_Router_Interface
{
    public function assemble($userParams, $name = null, $reset = false, $encode = true) {}
    public function route(Zend_Controller_Request_Abstract $dispatcher) {}
}
</pre>
<p>基本的には以上で実行できるが</p>
<h3>■アクセスコントロールの設定</h3>
<p>アクセスコントロールを行っている場合は上述のコードよりも先にアクセスできるようにしなければならない。以下は一例。</p>
<pre class="brush: php;">
$sesion = new Zend_Session_Namespace('global');
$sesion-&gt;userLevel = 'admin';
$acl = new Zend_Acl();
$acl-&gt;addRole(new Zend_Acl_Role('guest'));
$acl-&gt;addRole(new Zend_Acl_Role('admin'), 'guest');
$acl-&gt;add(new Zend_Acl_Resource('guestPage'));
$acl-&gt;add(new Zend_Acl_Resource('adminPage'));
$acl-&gt;allow('guest');
$acl-&gt;allow('admin');
$acl-&gt;deny('guest', 'adminPage');
$acl-&gt;allow('admin', 'adminPage');
Zend_Registry::set('acl', $acl);
</pre>
<p>基本的には一般ユーザが閲覧（実行）できる場所に、このファイルを配置するのは良くない。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justoneplanet.info/2010/02/14/zendframework%e3%81%a7%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%83%a9%e3%82%a4%e3%83%b3%e3%81%8b%e3%82%89%e3%82%a2%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e3%82%92%e5%ae%9f%e8%a1%8c%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPの定数とOS</title>
		<link>http://blog.justoneplanet.info/2010/02/14/php%e3%81%ae%e5%ae%9a%e6%95%b0%e3%81%a8os/</link>
		<comments>http://blog.justoneplanet.info/2010/02/14/php%e3%81%ae%e5%ae%9a%e6%95%b0%e3%81%a8os/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 13:45:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.justoneplanet.info/?p=2390</guid>
		<description><![CDATA[■OS
OS名

echo PHP_OS;

■path
パスを区切る文字

echo PATH_SEPARATOR;// linux =&#62; ';', win =&#62; ':'

■directory
ディレクト [...]]]></description>
			<content:encoded><![CDATA[<h3>■OS</h3>
<p>OS名</p>
<pre class="brush: php;">
echo PHP_OS;
</pre>
<h3>■path</h3>
<p>パスを区切る文字</p>
<pre class="brush: php;">
echo PATH_SEPARATOR;// linux =&gt; ';', win =&gt; ':'
</pre>
<h3>■directory</h3>
<p>ディレクトリを区切る文字</p>
<pre class="brush: php;">
echo DIRECTORY_SEPARATOR;// linux =&gt; '/', win =&gt; '\'
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.justoneplanet.info/2010/02/14/php%e3%81%ae%e5%ae%9a%e6%95%b0%e3%81%a8os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>createElementでtableを挿入するときのIEの挙動</title>
		<link>http://blog.justoneplanet.info/2010/02/14/createelement%e3%81%a7table%e3%82%92%e6%8c%bf%e5%85%a5%e3%81%99%e3%82%8b%e3%81%a8%e3%81%8d%e3%81%aeie%e3%81%ae%e6%8c%99%e5%8b%95/</link>
		<comments>http://blog.justoneplanet.info/2010/02/14/createelement%e3%81%a7table%e3%82%92%e6%8c%bf%e5%85%a5%e3%81%99%e3%82%8b%e3%81%a8%e3%81%8d%e3%81%aeie%e3%81%ae%e6%8c%99%e5%8b%95/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 18:48:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.justoneplanet.info/?p=2387</guid>
		<description><![CDATA[以下のコードはIE以外では正常に動作する。

var table = document.createElement('table');
var tr = document.createElement('tr');
var [...]]]></description>
			<content:encoded><![CDATA[<p>以下のコードはIE以外では正常に動作する。</p>
<pre class="brush: jscript;">
var table = document.createElement('table');
var tr = document.createElement('tr');
var td = document.createElement('td');
var img = document.createElement('img');
document.getElementById('container').appendChild(table).appendChild(tr).appendChild(td).appendChild(img);
</pre>
<p>以下のコードはIEでも動作する。違いはtbodyを明示してあげる事。</p>
<pre class="brush: jscript;">
var table = document.createElement('table');
var tbody = document.createElement('tbody');
var tr = document.createElement('tr');
var td = document.createElement('td');
var img = document.createElement('img');
document.getElementById('container').appendChild(table).appendChild(tbody).appendChild(tr).appendChild(td).appendChild(img);
</pre>
<h4>html 4.01</h4>
<p><a href="http://www.asahi-net.or.jp/~SD5A-UCD/rec-html401j/struct/tables.html#h-11.2.3">11.2.3 行グループ: THEAD、 TFOOT、及びTBODY要素</a></p>
<blockquote><p>TBODY開始タグは、表が本体をただ1つだけ含んでいてヘッダもフッタも含まないという場合を除き、常に必要である。</p></blockquote>
<p>へー</p>
<h4>html 5</h4>
<p><a href="http://www.html5.jp/tag/elements/table.html">table 要素</a></p>
<blockquote><p>0 個以上の tbody  要素</p></blockquote>
<p>ふむふむ</p>
<h5>参考</h5>
<p><a href="http://w3g.jp/xhtml/dic/tbody">http://w3g.jp/xhtml/dic/tbody</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.justoneplanet.info/2010/02/14/createelement%e3%81%a7table%e3%82%92%e6%8c%bf%e5%85%a5%e3%81%99%e3%82%8b%e3%81%a8%e3%81%8d%e3%81%aeie%e3%81%ae%e6%8c%99%e5%8b%95/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
