メイン

2008年12月18日

外部のPHPを実行

require ("hogehoge.php");
?>

2008年12月17日

arrayのlengthをとる

count($ary)

2008年10月15日

遅延

echo date('h:i:s') . "\n";

//強制的な遅延
sleep(10);

echo date('h:i:s') . "\n";

?>

2008年09月26日

ファイルの読み書き

$html = read_file("test1.html");
write_file("test2.html", $html);

function read_file($filepath)
{
$fd = fopen($filepath, "r");
$content = fread($fd, filesize($filepath));
fclose($fd);
return $content;
}

function write_file($filepath, $content)
{
$fd = fopen($filepath, "w");
fwrite($fd, $content);
fclose($fd);
}

as3でpost

http://www.at-sonic.com/blog/archives/2008/02/as3php.phpを参考に。