<?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>ひろぽっぽれす &#187; PHP</title>
	<atom:link href="http://hiropo.co.uk/archives/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://hiropo.co.uk</link>
	<description>Web系エンジニアの適当なブログです。どうでも酔いものばかり作ってます。</description>
	<lastBuildDate>Sun, 25 Jul 2010 17:09:15 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>ディレクトリごとFTPでアップロードしてくれるスクリプト &#8211; コマンドラインPHP</title>
		<link>http://hiropo.co.uk/archives/279</link>
		<comments>http://hiropo.co.uk/archives/279#comments</comments>
		<pubDate>Sat, 22 Aug 2009 18:17:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[pear]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/?p=279</guid>
		<description><![CDATA[JavaScriptネタばかりで飽きてきたので、PHPネタでも書いてみる。 最近はまっているのは、webアプリケーションを作るためのPHPではなく、コマンドラインでいろいろできるPHPスクリプトを組むことです。 bashでも良いんだけど、やはり物足りないので、（と言ってもそこまで使いこなしていない・・・。）Pythonという選択肢もあるけど、Pythonわかんないので、PHPを使って、ディレクトリごとFTPでアップロードしてくれるスクリプトを書いてみた。 PEARライブラリを使ったソースコードになっているので、このクラスを使う場合、PEARのインストールが必要になってくる。 まずは、型となる ftp_dir_put.class を定義する。 ファイル名は ftp_dir_put.php で保存。 PLAIN TEXT PHP: &#60;?php &#160; /***************************************************** * *&#160; ftp_dir_put.class * *&#160; ftpアップロードをディレクトリ単位で実行するクラス *&#160; Terminal上での実行専用 * *****************************************************/ &#160; require_once 'Net/FTP.php'; &#160; class ftp_dir_put &#123; &#160; &#160; /*------------------------------------- &#160; *&#160; コンストラクタ &#160; */ &#160; public function ftp_dir_put&#40; $ftp_server, $ftp_user_name, $ftp_user_pass, $remote_dir, $local_dir, $mode &#41;&#123; &#160; &#160; /*------------------------------------- [...]]]></description>
			<content:encoded><![CDATA[<p>JavaScriptネタばかりで飽きてきたので、PHPネタでも書いてみる。<br />
最近はまっているのは、webアプリケーションを作るためのPHPではなく、コマンドラインでいろいろできるPHPスクリプトを組むことです。</p>
<p>bashでも良いんだけど、やはり物足りないので、（と言ってもそこまで使いこなしていない・・・。）Pythonという選択肢もあるけど、Pythonわかんないので、PHPを使って、ディレクトリごとFTPでアップロードしてくれるスクリプトを書いてみた。</p>
<p>PEARライブラリを使ったソースコードになっているので、このクラスを使う場合、PEARのインストールが必要になってくる。</p>
<p>まずは、型となる ftp_dir_put.class を定義する。<br />
ファイル名は ftp_dir_put.php で保存。</p>
<div class="igBar"><span id="lphp-4"><a href="#" onclick="javascript:showCodeTxt('php-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-4">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/*****************************************************</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*&nbsp; ftp_dir_put.class</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*&nbsp; ftpアップロードをディレクトリ単位で実行するクラス</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*&nbsp; Terminal上での実行専用</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*****************************************************/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">require_once</span> <span style="color:#FF0000;">'Net/FTP.php'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">class</span> ftp_dir_put <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#008000;">/*-------------------------------------</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; *&nbsp; コンストラクタ</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; public <span style="color:#000000; font-weight:bold;">function</span> ftp_dir_put<span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$ftp_server</span>, <span style="color:#0000FF;">$ftp_user_name</span>, <span style="color:#0000FF;">$ftp_user_pass</span>, <span style="color:#0000FF;">$remote_dir</span>, <span style="color:#0000FF;">$local_dir</span>, <span style="color:#0000FF;">$mode</span> <span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#008000;">/*-------------------------------------</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; &nbsp; *&nbsp; $target_hostオブジェクトを生成</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; &nbsp; */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$target_host</span> = <span style="color:#000000; font-weight:bold;">new</span> Net_FTP<span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$ftp_server</span>, <span style="color:#CC66CC;color:#800000;">21</span> <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//ftpサーバに接続</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$target_host</span>-&gt;<span style="color:#006600;">connect</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$ftp_server</span>&nbsp; <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#0000FF;">$ftp_server</span>.<span style="color:#FF0000;">' に接続しました'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//接続後、ログイン認証</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$target_host</span>-&gt;<span style="color:#006600;">login</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$ftp_user_name</span>, <span style="color:#0000FF;">$ftp_user_pass</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#0000FF;">$ftp_server</span>.<span style="color:#FF0000;">' にログインしました'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#0000FF;">$local_dir</span>.<span style="color:#FF0000;">' を '</span>.<span style="color:#0000FF;">$remote_dir</span>.<span style="color:#FF0000;">' にアップロードしています･･･'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$target_host</span>-&gt;<span style="color:#006600;">putRecursive</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$local_dir</span>, <span style="color:#0000FF;">$remote_dir</span>, <span style="color:#0000FF;">$mode</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#FF0000;">'アップロードが終わりました'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$target_host</span>-&gt;<span style="color:#006600;">disconnect</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#FF0000;">'ログアウトしました'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#FF0000;">'ログアウトに失敗しました'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#FF0000;">'アップロードに失敗しました'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$target_host</span>-&gt;<span style="color:#006600;">disconnect</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#FF0000;">'ログアウトしました'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#FF0000;">'ログアウトに失敗しました'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#FF0000;">'ログイン失敗しました'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#0000FF;">$ftp_server</span>.<span style="color:#FF0000;">' に接続できません'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>そして、この ftp_dir_put.class を newして実行するファイルを作成<br />
ファイル名は、test_host.php とかで保存。</p>
<div class="igBar"><span id="lphp-5"><a href="#" onclick="javascript:showCodeTxt('php-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-5">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">require_once</span> <span style="color:#FF0000;">'ftp_dir_put.php'</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> init<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#008000;">/*-------------------------------------</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; *&nbsp; プロパティセット</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; */</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#0000FF;">$ftp_server</span> = <span style="color:#FF0000;">'host_name'</span>;&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#FF9933; font-style:italic;">//ftpサーバーアドレス</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#0000FF;">$ftp_user_name</span> = <span style="color:#FF0000;">'user_name'</span>;&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//ユーザー名</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#0000FF;">$ftp_user_pass</span> = <span style="color:#FF0000;">'user_pass'</span>;&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//パスワード</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#0000FF;">$remote_dir</span> = <span style="color:#FF0000;">'/'</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#FF9933; font-style:italic;">//サーバー側ディレクトリパス</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#0000FF;">$local_dir</span> = <span style="color:#FF0000;">'/var/www/html/'</span>;&nbsp; &nbsp;<span style="color:#FF9933; font-style:italic;">//ローカル側ディレクトリパス</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#0000FF;">$mode</span> = <span style="color:#000000; font-weight:bold;">true</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//オーバーライド</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#008000;">/*-------------------------------------</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; *&nbsp; 実行オブジェクト</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; */</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#0000FF;">$test_init</span> = <span style="color:#000000; font-weight:bold;">new</span> ftp_dir_put<span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$ftp_server</span>,</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$ftp_user_name</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$ftp_user_pass</span>,</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$remote_dir</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$local_dir</span>,</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$mode</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">init<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>これで、あとはコマンドラインにて、この test_host.php を実行</p>
<div class="igBar"><span id="lcode-6"><a href="#" onclick="javascript:showCodeTxt('code-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-6">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>user@host ~<span style="color:#006600; font-weight:bold;">&#93;</span>$ php test_host.<span style="">php</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>で、あとは勝手にアップロードしてくれる。<br />
PEAR、凄いよ、PEAR。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/279/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpでmkdirとrmdirをひたすら繰り返してみた</title>
		<link>http://hiropo.co.uk/archives/166</link>
		<comments>http://hiropo.co.uk/archives/166#comments</comments>
		<pubDate>Tue, 07 Jul 2009 03:22:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/?p=166</guid>
		<description><![CDATA[Ajaxも飽きてきたのでそろそろPHPをやろうと思いやっとphpに入門しました。 とりあえず無駄にディレクトリを作ったり消したりしてみた。 # あらかじめ、/ooiwa/ は、パーミッションを777にしてある。 PLAIN TEXT PHP: $_dir = '/ooiwa/ahya'; $permit = 0777; &#160; if&#40; !file_exists&#40;$_dir&#41; &#41;&#123; &#160; &#160;print '&#34;'.$_dir.'&#34; はありません。'."\n"; &#160; &#160;if&#40; mkdir&#40; $_dir , $permit &#41; &#41;&#123; &#160; &#160; &#160; print '&#34;'.$_dir.'&#34; を生成しました。'."\n"; &#160; &#160;&#125;else&#123; &#160; &#160; &#160; print '&#34;'.$_dir.'&#34; を生成できませんでした。'."\n"; &#160; &#160;&#125; &#125;else&#123; &#160; &#160;print '&#34;'.$_dir.'&#34; はすでに存在します。'."\n"; &#160; &#160;if&#40; rmdir&#40; $_dir [...]]]></description>
			<content:encoded><![CDATA[<p>Ajaxも飽きてきたのでそろそろPHPをやろうと思いやっとphpに入門しました。<br />
とりあえず無駄にディレクトリを作ったり消したりしてみた。</p>
<p># あらかじめ、/ooiwa/ は、パーミッションを777にしてある。</p>
<div class="igBar"><span id="lphp-8"><a href="#" onclick="javascript:showCodeTxt('php-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-8">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$_dir</span> = <span style="color:#FF0000;">'/ooiwa/ahya'</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$permit</span> = <span style="color:#CC66CC;color:#800000;">0777</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span> !<a href="http://www.php.net/file_exists"><span style="color:#000066;">file_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_dir</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#FF0000;">'&quot;'</span>.<span style="color:#0000FF;">$_dir</span>.<span style="color:#FF0000;">'&quot; はありません。'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span> <a href="http://www.php.net/mkdir"><span style="color:#000066;">mkdir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$_dir</span> , <span style="color:#0000FF;">$permit</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#FF0000;">'&quot;'</span>.<span style="color:#0000FF;">$_dir</span>.<span style="color:#FF0000;">'&quot; を生成しました。'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#FF0000;">'&quot;'</span>.<span style="color:#0000FF;">$_dir</span>.<span style="color:#FF0000;">'&quot; を生成できませんでした。'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#FF0000;">'&quot;'</span>.<span style="color:#0000FF;">$_dir</span>.<span style="color:#FF0000;">'&quot; はすでに存在します。'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span> <a href="http://www.php.net/rmdir"><span style="color:#000066;">rmdir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$_dir</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#FF0000;">'&quot;'</span>.<span style="color:#0000FF;">$_dir</span>.<span style="color:#FF0000;">'&quot; を削除しました。'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#FF0000;">'&quot;'</span>.<span style="color:#0000FF;">$_dir</span>.<span style="color:#FF0000;">'&quot; を削除できませんでした。'</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>ディレクトリは、ルートディレクトリからみてどこにでも作成できるらしい。イケないファイルやディレクトリは外から見えない領域にこっそり作れちゃいますね。</p>
<p>ただし、あらかじめphpで作成する場所の親ディレクトリは、パーミッションを 777 にしておかなくてはいけないので、そこがめんどっちいです。chmod()とかでどうにかならないかと思いましたが無理でした。</p>
<p>まぁそれができてしまったらいくらでもクラックできてしまうしできなくて当然だよね。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/166/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pearでHTTP_Requestクラスを使うには (1)</title>
		<link>http://hiropo.co.uk/archives/163</link>
		<comments>http://hiropo.co.uk/archives/163#comments</comments>
		<pubDate>Thu, 02 Jul 2009 16:19:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[pear]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/?p=163</guid>
		<description><![CDATA[phpネイティブだとHTTP_Request通信はソースをいっぱい書かなきゃいけないが、PEAR拡張モジュールを使うことによってかなりラクができる。 ▼参考サイト http://www.phppro.jp/school/pear/vol8/1 HTTP_Requestクラスを使うには、下記のコマンドを実行する。 PLAIN TEXT CODE: &#91;root@host&#93;# pear install HTTP_Request これで晴れてHTTP_Requestが使いまくりである。 リファレンスはまた後日。]]></description>
			<content:encoded><![CDATA[<p>phpネイティブだとHTTP_Request通信はソースをいっぱい書かなきゃいけないが、PEAR拡張モジュールを使うことによってかなりラクができる。</p>
<p>▼参考サイト</p>
<p>http://www.phppro.jp/school/pear/vol8/1</p>
<p>HTTP_Requestクラスを使うには、下記のコマンドを実行する。</p>
<div class="igBar"><span id="lcode-10"><a href="#" onclick="javascript:showCodeTxt('code-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-10">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@host<span style="color:#006600; font-weight:bold;">&#93;</span># pear install HTTP_Request </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>これで晴れてHTTP_Requestが使いまくりである。<br />
リファレンスはまた後日。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/163/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpで削除できなくなったファイルを削除する</title>
		<link>http://hiropo.co.uk/archives/63</link>
		<comments>http://hiropo.co.uk/archives/63#comments</comments>
		<pubDate>Sat, 13 Dec 2008 13:46:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/?p=63</guid>
		<description><![CDATA[こんぬつわ。いまさらPHPの面白さがわかってきた僕です。 はるか昔に構築したXOOPSサイトの残骸で、パーミッショエラーで FTP上から削除できなくなったファイルをどうにか削除する方法はないかと悩んでいました。 そこで思いついたのが、PHPでした。 unlink();というファイルを削除する関数があるので、 PHPスクリプトをつくって対処することにしました。 削除対象： /xoops/uploads/photos/*.jpg /xoops/uploads/thumbs/*.jpg ※ "*" は、[1-*]の数字 上記ディレクトリ内にあるjpgファイルをすべて削除したいので、 下記のようなスクリプトを作成。 PLAIN TEXT PHP: &#60;?php $dir_photo = "uploads/photos/"; $dir_thum = "uploads/thumbs/"; &#160; for&#40;$i=0; $i&#60;100;$i++&#41;&#123; &#160; &#160; $a = unlink&#40;$dir_photo . $i . ".jpg"&#41;; &#160; &#160; $b = unlink&#40;$dir_thum . $i . ".jpg"&#41;; &#160; &#160; &#160; if&#40;$a == true &#124;&#124; $b == true&#41;&#123; [...]]]></description>
			<content:encoded><![CDATA[<p>こんぬつわ。いまさらPHPの面白さがわかってきた僕です。</p>
<p>はるか昔に構築したXOOPSサイトの残骸で、パーミッショエラーで<br />
FTP上から削除できなくなったファイルをどうにか削除する方法はないかと悩んでいました。</p>
<p>そこで思いついたのが、PHPでした。</p>
<p>unlink();というファイルを削除する関数があるので、<br />
PHPスクリプトをつくって対処することにしました。</p>
<p>削除対象：<br />
/xoops/uploads/photos/*.jpg<br />
/xoops/uploads/thumbs/*.jpg<br />
※ "*" は、[1-*]の数字</p>
<p>上記ディレクトリ内にあるjpgファイルをすべて削除したいので、<br />
下記のようなスクリプトを作成。</p>
<div class="igBar"><span id="lphp-12"><a href="#" onclick="javascript:showCodeTxt('php-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-12">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$dir_photo</span> = <span style="color:#FF0000;">"uploads/photos/"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$dir_thum</span> = <span style="color:#FF0000;">"uploads/thumbs/"</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">for</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$i</span>=<span style="color:#CC66CC;color:#800000;">0</span>; <span style="color:#0000FF;">$i</span>&lt;<span style="color:#CC66CC;color:#800000;">100</span>;<span style="color:#0000FF;">$i</span>++<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$a</span> = <a href="http://www.php.net/unlink"><span style="color:#000066;">unlink</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir_photo</span> . <span style="color:#0000FF;">$i</span> . <span style="color:#FF0000;">".jpg"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$b</span> = <a href="http://www.php.net/unlink"><span style="color:#000066;">unlink</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir_thum</span> . <span style="color:#0000FF;">$i</span> . <span style="color:#FF0000;">".jpg"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$a</span> == <span style="color:#000000; font-weight:bold;">true</span> || <span style="color:#0000FF;">$b</span> == <span style="color:#000000; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"["</span>.<span style="color:#0000FF;">$dir_photo</span>.<span style="color:#0000FF;">$i</span>.<span style="color:#FF0000;">"jpg"</span>.<span style="color:#FF0000;">"]"</span>.<span style="color:#FF0000;">"true"</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"["</span>.<span style="color:#0000FF;">$dir_thum</span>.<span style="color:#0000FF;">$i</span>.<span style="color:#FF0000;">"jpg"</span>.<span style="color:#FF0000;">"]"</span>.<span style="color:#FF0000;">"true"</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"["</span>.<span style="color:#0000FF;">$dir_photo</span>.<span style="color:#0000FF;">$i</span>.<span style="color:#FF0000;">"jpg"</span>.<span style="color:#FF0000;">"]"</span>.<span style="color:#FF0000;">"false"</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"["</span>.<span style="color:#0000FF;">$dir_thum</span>.<span style="color:#0000FF;">$i</span>.<span style="color:#FF0000;">"jpg"</span>.<span style="color:#FF0000;">"]"</span>.<span style="color:#FF0000;">"false"</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>削除に成功したら、"true"、失敗したら"false"を返すようにした。<br />
ファイル数の取得の仕方がわからなかったので、とりあえず<br />
ループで100回まわすことにした。</p>
<p>で、実行した結果、無事にすべてのjpgファイルの削除に成功。<br />
これでようやく残骸を削除することができた。</p>
<p>PHPって便利だねぇ。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/63/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScriptでvar_dump()が使えるライブラリ &#8211; funny.js</title>
		<link>http://hiropo.co.uk/archives/46</link>
		<comments>http://hiropo.co.uk/archives/46#comments</comments>
		<pubDate>Fri, 12 Sep 2008 09:53:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/archives/46</guid>
		<description><![CDATA[PHPのvar_dump() が、JavaScriptで var_dump()できちゃうライブラリです。 var_dump() ver_0.5 ダウンロード 使い方は以下の通りです。 funny.jsを読み込んで、PHPと同じ感覚で、var_dump() しちゃってください。 シンタックスエラー以外は何かしら返ってくると思います。 PLAIN TEXT HTML: &#60;script src="funny.js" type="text/javascript"&#62;&#60;/script&#62; &#60;script type="text/javascript"&#62; &#160; var a = 123; funny.var_dump( a ); &#160; &#60;/script&#62;]]></description>
			<content:encoded><![CDATA[<p>PHPのvar_dump() が、JavaScriptで var_dump()できちゃうライブラリです。</p>
<p><a href="http://www.funnythingz.com/common/file/funny_0.5.lzh">var_dump() ver_0.5 ダウンロード</a></p>
<p>使い方は以下の通りです。<br />
funny.jsを読み込んで、PHPと同じ感覚で、var_dump() しちゃってください。<br />
シンタックスエラー以外は何かしら返ってくると思います。</p>
<div class="igBar"><span id="lhtml-14"><a href="#" onclick="javascript:showCodeTxt('html-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-14">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">&lt;script</span></a> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">"funny.js"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text/javascript"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">&lt;script</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text/javascript"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">var a = 123;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">funny.var_dump( a );</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/46/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>var_dumpの基礎をつくった &#8211; for in文</title>
		<link>http://hiropo.co.uk/archives/44</link>
		<comments>http://hiropo.co.uk/archives/44#comments</comments>
		<pubDate>Thu, 04 Sep 2008 09:23:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/archives/44</guid>
		<description><![CDATA[あれから自分でも var_dump関数 をつくってみました。 PLAIN TEXT JavaScript: var_dump&#40;document&#41;; &#160; //var_dump function var_dump&#40;$obj&#41; &#123; &#160; &#160; var $objList = ""; &#160; &#160; for&#40;$i in $obj&#41; &#123; &#160; &#160; &#160; &#160; $objList += $i + "：" + $obj&#91;$i&#93; + "\n"; &#160; &#160; &#125; &#160; &#160; alert&#40; $objList &#41;; &#125; windowとかやったら多分PC落ちるんじゃないかと・・・。 alert(); じゃなくて、documentに書き出す仕様をつくったらまた公開しまする。]]></description>
			<content:encoded><![CDATA[<p>あれから自分でも var_dump関数 をつくってみました。</p>
<div class="igBar"><span id="ljavascript-16"><a href="#" onclick="javascript:showCodeTxt('javascript-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-16">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">var_dump<span style="color: #66cc66;">&#40;</span>document<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">//var_dump</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> var_dump<span style="color: #66cc66;">&#40;</span>$obj<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> $objList = <span style="color: #3366CC;">""</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">for</span><span style="color: #66cc66;">&#40;</span>$i <span style="color: #000066; font-weight: bold;">in</span> $obj<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; $objList += $i + <span style="color: #3366CC;">"："</span> + $obj<span style="color: #66cc66;">&#91;</span>$i<span style="color: #66cc66;">&#93;</span> + <span style="color: #3366CC;">"<span style="color: #000099; font-weight: bold;">\n</span>"</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span> $objList <span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>windowとかやったら多分PC落ちるんじゃないかと・・・。</p>
<p>alert(); じゃなくて、documentに書き出す仕様をつくったらまた公開しまする。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/44/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL インストールメモ</title>
		<link>http://hiropo.co.uk/archives/38</link>
		<comments>http://hiropo.co.uk/archives/38#comments</comments>
		<pubDate>Fri, 06 Jun 2008 10:14:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/archives/38</guid>
		<description><![CDATA[インスコメモです。 PLAIN TEXT CODE: vi /etc/php.ini extension=php_mbstring.dll　←有効 extension=php_mysql.dll　←有効 ▽phpでmysqlを有効化する。 PLAIN TEXT CODE: yum -y install php-mbstring php-mysql]]></description>
			<content:encoded><![CDATA[<p>インスコメモです。</p>
<div class="igBar"><span id="lcode-19"><a href="#" onclick="javascript:showCodeTxt('code-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-19">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">vi /etc/php.<span style="">ini</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">extension=php_mbstring.<span style="">dll</span>　←有効</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">extension=php_mysql.<span style="">dll</span>　←有効 </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>▽phpでmysqlを有効化する。</p>
<div class="igBar"><span id="lcode-20"><a href="#" onclick="javascript:showCodeTxt('code-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-20">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">yum -y install php-mbstring php-mysql </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/38/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SecureShell2関数を使う。 &#8211; SSH2インストール</title>
		<link>http://hiropo.co.uk/archives/33</link>
		<comments>http://hiropo.co.uk/archives/33#comments</comments>
		<pubDate>Wed, 30 Apr 2008 03:48:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FedoraCore]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/archives/33</guid>
		<description><![CDATA[SSH2インストール 参考URL http://www.php.net/manual/ja/book.ssh2.php ・OpenSSLインストール PLAIN TEXT CODE: # yum install openssl-devel ・libssh2をダウンロードしてインストール http://sourceforge.net/projects/libssh2/ PLAIN TEXT CODE: # ./configure &#38;&#38; make all install ・ssh2モジュールのインストール PLAIN TEXT CODE: # pecl download ssh2-beta # phpize &#38;&#38; ./configure –with-ssh2 ※phpizeがない場合、 PLAIN TEXT CODE: # yum install php-dev でインストールする。 config.h に 「#define LIBSSH2_APINO 200412301450」 を追記する。 PLAIN TEXT CODE: # vi [...]]]></description>
			<content:encoded><![CDATA[<p>SSH2インストール</p>
<p>参考URL</p>
<p>http://www.php.net/manual/ja/book.ssh2.php</p>
<p>・OpenSSLインストール</p>
<div class="igBar"><span id="lcode-27"><a href="#" onclick="javascript:showCodeTxt('code-27'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-27">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># yum install openssl-devel </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>・libssh2をダウンロードしてインストール</p>
<p>http://sourceforge.net/projects/libssh2/</p>
<div class="igBar"><span id="lcode-28"><a href="#" onclick="javascript:showCodeTxt('code-28'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-28">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># ./configure &amp;&amp; make all install </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>・ssh2モジュールのインストール</p>
<div class="igBar"><span id="lcode-29"><a href="#" onclick="javascript:showCodeTxt('code-29'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-29">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># pecl download ssh2-beta</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># phpize &amp;&amp; ./configure –with-ssh2 </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>※phpizeがない場合、</p>
<div class="igBar"><span id="lcode-30"><a href="#" onclick="javascript:showCodeTxt('code-30'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-30">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># yum install php-dev </div>
</li>
</ol>
</div>
</div>
</div>
<p>
でインストールする。</p>
<p>config.h に<br />
「#define LIBSSH2_APINO 200412301450」<br />
を追記する。</p>
<div class="igBar"><span id="lcode-31"><a href="#" onclick="javascript:showCodeTxt('code-31'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-31">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># vi config.<span style="">h</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># make </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>php.ini ファイルの extension_dir で指定された場所に ssh2.so をコピー。<br />
php.iniにextention=ssh2.soを追記</p>
<p>php.ini の設定を再読込させるため、Web サーバを再起動します。</p>
<div class="igBar"><span id="lcode-32"><a href="#" onclick="javascript:showCodeTxt('code-32'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-32">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># /etc/rc.<span style="">d</span>/init.<span style="">d</span>/httpd restart </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>phpinfo()にてssh2のブロックが確認できれば成功です。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/33/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pearインストール メモ</title>
		<link>http://hiropo.co.uk/archives/31</link>
		<comments>http://hiropo.co.uk/archives/31#comments</comments>
		<pubDate>Fri, 25 Apr 2008 08:29:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/archives/31</guid>
		<description><![CDATA[pearをインストールしてみた。 PLAIN TEXT CODE: &#91;ooiwa@EVA01_TEST ~&#93;$ pwd /home/ooiwa/ &#91;ooiwa@EVA01_TEST ~&#93;$ mkdir pear &#91;ooiwa@EVA01_TEST ~&#93;$ cd pear/ &#91;ooiwa@EVA01_TEST pear&#93;$ wget http://pear.php.net/go-pear &#91;ooiwa@EVA01_TEST pear&#93;$ mv go-pear go-pear.php &#91;ooiwa@EVA01_TEST pear&#93;$ php -Cq go-pear.php &#160; &#91;ooiwa@EVA01_TEST pear&#93;$ /home/ooiwa/pear/bin/pear install PEAR WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update Did not download optional dependencies: pear/XML_RPC, use [...]]]></description>
			<content:encoded><![CDATA[<p>pearをインストールしてみた。</p>
<div class="igBar"><span id="lcode-34"><a href="#" onclick="javascript:showCodeTxt('code-34'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-34">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>ooiwa@EVA01_TEST ~<span style="color:#006600; font-weight:bold;">&#93;</span>$ pwd</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/home/ooiwa/</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>ooiwa@EVA01_TEST ~<span style="color:#006600; font-weight:bold;">&#93;</span>$ mkdir pear</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>ooiwa@EVA01_TEST ~<span style="color:#006600; font-weight:bold;">&#93;</span>$ cd pear/</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>ooiwa@EVA01_TEST pear<span style="color:#006600; font-weight:bold;">&#93;</span>$ wget http:<span style="color:#FF9933; font-style:italic;">//pear.php.net/go-pear</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>ooiwa@EVA01_TEST pear<span style="color:#006600; font-weight:bold;">&#93;</span>$ mv go-pear go-pear.<span style="">php</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>ooiwa@EVA01_TEST pear<span style="color:#006600; font-weight:bold;">&#93;</span>$ php -Cq go-pear.<span style="">php</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>ooiwa@EVA01_TEST pear<span style="color:#006600; font-weight:bold;">&#93;</span>$ /home/ooiwa/pear/bin/pear install PEAR</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">WARNING: channel <span style="color:#CC0000;">"pear.php.net"</span> has updated its protocols, use <span style="color:#CC0000;">"channel-update pear.php.net"</span> to update</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Did not download optional dependencies: pear/XML_RPC, use --alldeps to download automatically</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">pear/PEAR can optionally use package <span style="color:#CC0000;">"pear/XML_RPC"</span> <span style="color:#006600; font-weight:bold;">&#40;</span>version&gt;= <span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">4</span>.<span style="color:#800000;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">downloading PEAR-<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">7</span>.<span style="color:#800000;color:#800000;">1</span>.<span style="">tgz</span> ...</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">Starting</span> to download PEAR-<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">7</span>.<span style="color:#800000;color:#800000;">1</span>.<span style="">tgz</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">302</span>,<span style="color:#800000;color:#800000;">377</span> bytes<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.........................<span style="">done</span>: <span style="color:#800000;color:#800000;">302</span>,<span style="color:#800000;color:#800000;">377</span> bytes</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">downloading Archive_Tar-<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">3</span>.<span style="color:#800000;color:#800000;">2</span>.<span style="">tgz</span> ...</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">Starting</span> to download Archive_Tar-<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">3</span>.<span style="color:#800000;color:#800000;">2</span>.<span style="">tgz</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">17</span>,<span style="color:#800000;color:#800000;">150</span> bytes<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">...<span style="">done</span>: <span style="color:#800000;color:#800000;">17</span>,<span style="color:#800000;color:#800000;">150</span> bytes</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">downloading Structures_Graph-<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">2</span>.<span style="">tgz</span> ...</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">Starting</span> to download Structures_Graph-<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">2</span>.<span style="">tgz</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">30</span>,<span style="color:#800000;color:#800000;">947</span> bytes<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">...<span style="">done</span>: <span style="color:#800000;color:#800000;">30</span>,<span style="color:#800000;color:#800000;">947</span> bytes</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">downloading Console_Getopt-<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">2</span>.<span style="color:#800000;color:#800000;">3</span>.<span style="">tgz</span> ...</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">Starting</span> to download Console_Getopt-<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">2</span>.<span style="color:#800000;color:#800000;">3</span>.<span style="">tgz</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">4</span>,<span style="color:#800000;color:#800000;">011</span> bytes<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">...<span style="">done</span>: <span style="color:#800000;color:#800000;">4</span>,<span style="color:#800000;color:#800000;">011</span> bytes</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">install ok: channel:<span style="color:#FF9933; font-style:italic;">//pear.php.net/Archive_Tar-1.3.2</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">install ok: channel:<span style="color:#FF9933; font-style:italic;">//pear.php.net/Structures_Graph-1.0.2</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">install ok: channel:<span style="color:#FF9933; font-style:italic;">//pear.php.net/Console_Getopt-1.2.3</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">install ok: channel:<span style="color:#FF9933; font-style:italic;">//pear.php.net/PEAR-1.7.1</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR: Optional feature webinstaller available <span style="color:#006600; font-weight:bold;">&#40;</span>PEAR<span style="color:#CC0000;">'s web-based installer)</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">PEAR: Optional feature gtkinstaller available (PEAR'</span>s PHP-GTK-based installer<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR: Optional feature gtk2installer available <span style="color:#006600; font-weight:bold;">&#40;</span>PEAR<span style="color:#CC0000;">'s PHP-GTK2-based installer)</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">PEAR: To install optional features use &quot;pear install pear/PEAR#featurename&quot;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">[ooiwa@EVA01_TEST pear]$ bin/pear list</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">Installed packages, channel pear.php.net:</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">=========================================</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">Package&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Version State</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">Archive_Tar&nbsp; &nbsp; &nbsp; 1.3.2&nbsp; &nbsp;stable</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">Console_Getopt&nbsp; &nbsp;1.2.3&nbsp; &nbsp;stable</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">PEAR&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1.7.1&nbsp; &nbsp;stable</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">Structures_Graph 1.0.2&nbsp; &nbsp;stable </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/31/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
