Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

bcompiler write exe footer function syntax tag tutorial 2013





Alert! Connect with 10,000 Chating Online. Join Now

Php bcompiler write exe footer () function

Write your php code

 
<?php ?>

Php Result


Your code below



(no version information, might be only in CVS)

bcompiler_write_exe_footer -- Writes the the start pos, and sig to the end of a exe type file

Syntax

bool bcompiler_write_exe_footer ( resource filehandle, int startpos )

Warning

This function is EXPERIMENTAL. The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP. Use this function at your own risk.

An EXE (or self executable) file consists of 3 parts,

The stub (executable code, e.g. a compiled C program) that loads PHP interpreter, bcompiler extension, stored Bytecodes and initiates a call for the specified function (e.g. main) or class method (e.g. main::main)
The Bytecodes (uncompressed only for the moment)
The bcompiler EXE footer

The startpos is the file position at which the Bytecodes start, and can be obtained using ftell($fh).

To obtain a suitable stub you can compile php_embed-based stub phpe.c located in the examples/embed directory on bcompiler's CVS.

Example 1. bcompiler_write_footer() example

<?php
/* creating the output file (example.exe) */
$fh = fopen("example.exe", "w");
/* 1) writing a stub (phpe.exe) */
$size = filesize("phpe.exe");
$fr = fopen("phpe.exe", "r");
fwrite($fh, fread($fr, $size), $size);
$startpos = ftell($fh);
/* 2) writing bytecodes */
bcompiler_write_header($fh);
bcompiler_write_class($fh, "myclass");
bcompiler_write_function($fh, "main");
bcompiler_write_footer($fh);
/* 3) writing EXE footer */
bcompiler_write_exe_footer($fh, $startpos);
/* closing the output file */
fclose($fh);
?>

See also bcompiler_write_header(), bcompiler_write_class(), and bcompiler_write_footer().

Php bcompiler write exe footer Function syntax tag

bcompiler write exe footer php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online



Php bcompiler write exe footer syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.


Function index

Variables

Expressions

Operators

Control-Structures

Cookies

Array

Date & Time

Directory function

File

Image

Operators

Form data handling

Mathematics operators

Mail

Php Mysql

Network Functions

Strings

php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
 
 
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online