mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-30 04:29:01 +01:00
23 lines
360 B
PHP
23 lines
360 B
PHP
<?php
|
|
|
|
function r($rs,$data)
|
|
{
|
|
global $buf;
|
|
global $x;
|
|
$buf .= $data;
|
|
if ($rs != 0) {
|
|
echo "moe";
|
|
uv_fs_read(uv_default_loop(),$x,"r");
|
|
} else {
|
|
var_dump($buf);
|
|
}
|
|
|
|
}
|
|
uv_fs_open(uv_default_loop(),"./fs.php", 0, 0, function($r){
|
|
global $x;
|
|
$x = $r;
|
|
uv_fs_read(uv_default_loop(),$r,"r");
|
|
});
|
|
|
|
|
|
uv_run(); |