bcompiler php,PHP bcompiler 函数

用户评论:

volomike (2012-08-14 04:07:53)

I'm using bencoder v1.6 and latest bcompiler (http://pecl.php.net/get/bcompiler) -- 1.0.2 at time of writing this -- and I ran a test on PHP5 static class functions and regular class functions, and then ran a test with __FILE__. I encountered no problems. So, at least the static class issue and the __FILE__ issue is resolved now.

However, please continue your testing and reporting bugs (https://bugs.php.net/report.php?package=bcompiler).

mail - at- albertkok - dot - com (2009-10-01 04:06:34)

It's been a while since my past post, but yes, I'm still using bcompiler. I just found another problem that I think you should be aware of. It took me hours to find.

It pretty much comes to this: When compiling on a 64-bit Linux operating system, your compiled code will NOT run on a 32-bit version, and visa versa. It will merely echo the file's content.

Regards,

Albert Kok

codeslinger+uph80111 at compsalot dot com (2008-01-11 09:16:12)

try this, I believe that it will solve the problem with __FILE__

echo"\n
FILE = '$Foo'\n";?>

Albert Kok (2007-10-24 04:08:34)

A few notes to succesfully configure PHP5 to load bcompiler.

In case of using Debian/Ubuntu Linux: When installing from the PECL (PEAR) package, make sure you have the php5-dev library installed in your system (apt-get install php5-dev).

Newer versions of Ubuntu may error out while installing bcompiler thru PECL, asking you to reinstall bzip2. This will not fix the installation. Instead, install the libbz2-dev library (apt-get install libbz2-dev) and try installing bcompiler from PECL again.

After installing bcompiler from PECL, don't forget to make sure you load the bcompiler.so library in your PHP configuration for the new bcompiler functions to become available. This is done by adding the following line to the bottom of your php.ini file(s):

extension=bcompiler.so

If you were to use the bcompiler functions thru your webserver, you need to restart it to reload the php configuration.

Regards,

Albert Kok

roberto at spadim dot net dot br (2007-06-24 22:33:00)

hello guys, since bencoder don't work for __FILE__ constants i have a bcompiler script working, anyone that want it can send me an email

the source is 100% compatible with original file, the only problem is php5 new function methods that

if (!function_exists('function_name')){

function function_name()

}

?>

don't work but it's a php5 new method for understand bytecode

cdsheen+bencoder at gmail dot com (2006-07-25 05:58:41)

Here's a script to act as a front-end for bcompiler, which may be very similar to the eA ones:

http://bbs.giga.net.tw/bencoder.php

BENCODER v1.1 - Encode your PHP script using bcompiler

Usage: bencoder [-f] -o FILE file1.php

bencoder [-f] -o OUTDIR file1.php file2.php ...

bencoder [-f] -o OUTDIR -a SRCDIR [-s SUFFIX] [-c] [-r]

-f : force overwriting even if the target exists

-o FILE : the file name to write the encoded script

(default to '-encoded.php' suffix)

-o OUTDIR : the directory to write all encoded files

-a SRCDIR : encode all files in this source directory

-s SUFFIX : encode the files with the SUFFIX extension only (default: php)

-c : copy files those shouldn't be encoded (no by default)

arplynn at gmail dot com (2006-04-28 08:49:42)

PHP seems to choke on trying to compile PHP5 classes with the private, protected or public modifiers. Additionally, when including files with properly compiled classes on PHP5, it works fine but when php tries to exit it throws a segmentation fault.

It's just not a great idea to use bcompiler for anything other than functions on PHP5, at least for now.

tda at example dot com (2006-02-07 05:50:24)

Creating a function after checking if a function exists using function_exists will result in a "Zero Sized Reply" error.

this does NOT work any longer:

if (!function_exists("file_get_contents")) {

functionfile_get_contents($filename,$use_include_path=0)

{/*...define your own function here...*/}

}?>

Apache returns: "Zero Sized Reply" after compilation.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
提供的源码资源涵盖了安卓应用、小程序、Python应用和Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值