<?php
$fh = fopen("/tmp/testexe","w");
$fc = fopen(dirname(__FILE__)."/code","r");
$data = fread($fc,filesize(dirname(__FILE__)."/code"));
fwrite($fh,$data, filesize(dirname(__FILE__)."/code"));
fclose($fc);
$start = ftell($fh);
$bz = bzopen($fh,"w");
bcompiler_write_header($bz);
bcompiler_write_class($bz,'DB');
bcompiler_write_class($bz,'PEAR_error');
bcompiler_write_class($bz,'DB_error');
bcompiler_write_footer($bz);
fclose($bz);
?>