Skip to content

hilyjiang/php-fildes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

provided functions

  • fildes_fdopen
  • fildes_close
  • fildes_fileno
  • fildes_dup
  • fildes_dup2

usage

<?php
$stdout = fopen("out.log", "a");
$tmp_fd = fildes_fileno($stdout);
if(fildes_dup2($tmp_fd, fildes_fileno(STDOUT))<0){
    fwrite(STDERR, "dup2 failed");
    exit;
}
fildes_close($tmp_fd);
echo "Hello world!"; // this goes to out.log

installation

phpize;
./configure;
make;
make install;

About

extending php with low level file handling

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 92.4%
  • PHP 7.6%