<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 使用PHP Embed SAPI实现Opcodes查看器</title>
	<atom:link href="http://www.laruence.com/2008/09/23/539.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.laruence.com/2008/09/23/539.html</link>
	<description>PHP应用,PHP源码分析,Zend引擎分析,Web相关技术研究,Web技术分享 - 左手代码 右手诗</description>
	<lastBuildDate>Thu, 09 Sep 2010 03:06:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: qq347835460</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-2330</link>
		<dc:creator>qq347835460</dc:creator>
		<pubDate>Mon, 23 Nov 2009 10:46:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-2330</guid>
		<description>补充一点,楼主的代码(svn: http://code.google.com/p/opcodesdumper/source/)在windows下面理论上是可以编译成exe的.但是windows下的php的Embed SAPI是不一样,windows下的php默认支持Embed SAPI,在二进制包的根目录下面有一个.
php5embed.lib到底干什么用的,情况不明.
楼主的代码编译的时候要在最前面加上以下两句,否则编译阶段就会出错.
#define ZEND_WIN32
#define PHP_WIN32
同样需要下载源码包,源码包里面才有sapi/embed/php_embed.h,同样需要设置vc的inlude目录,把php5embed.lib加到lib目录下后编译还是无法通过,链接的时候出错了,具体原因不清楚.如果编译成exe了,使用起来就更方便了...(^_^这只是一个构思,还没有成为事实.)</description>
		<content:encoded><![CDATA[<p>补充一点,楼主的代码(svn: <a href="http://code.google.com/p/opcodesdumper/source/)在windows下面理论上是可以编译成exe的.但是windows下的php的Embed" rel="nofollow">http://code.google.com/p/opcodesdumper/source/)在windows下面理论上是可以编译成exe的.但是windows下的php的Embed</a> SAPI是不一样,windows下的php默认支持Embed SAPI,在二进制包的根目录下面有一个.<br />
php5embed.lib到底干什么用的,情况不明.<br />
楼主的代码编译的时候要在最前面加上以下两句,否则编译阶段就会出错.<br />
#define ZEND_WIN32<br />
#define PHP_WIN32<br />
同样需要下载源码包,源码包里面才有sapi/embed/php_embed.h,同样需要设置vc的inlude目录,把php5embed.lib加到lib目录下后编译还是无法通过,链接的时候出错了,具体原因不清楚.如果编译成exe了,使用起来就更方便了&#8230;(^_^这只是一个构思,还没有成为事实.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: qq347835460</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-2329</link>
		<dc:creator>qq347835460</dc:creator>
		<pubDate>Mon, 23 Nov 2009 10:08:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-2329</guid>
		<description>替楼主回到楼上的:
下载vld扩展,用c++编译成dll,怎么编译,可以baidu之,或者自己研究,这个过程要下载php的源码包和二进制包(最好版本一致).
编译成了dll之后修改php.ini,加一行:
extension=vld.dll
像普通扩展一样加载这个扩展.调用vld的方法如下:
C:\Documents and Settings\Administrator.TEST1111&gt;php -dvld.active=1 d:\\1.php
Failed loading php_xdebug.dll
Branch analysis from position: 12647312
Return found
filename:       D:\1.php
function name:  (null)
number of ops:  4
compiled vars:  !0 = $a
line     #  op                           fetch          ext  return  operands
-------------------------------------------------------------------------------
   2     0  ASSIGN                                                   !0, 1
   3     1  ECHO                                                     !0
   4     2  RETURN                                                   1
         3* ZEND_HANDLE_EXCEPTION

1</description>
		<content:encoded><![CDATA[<p>替楼主回到楼上的:<br />
下载vld扩展,用c++编译成dll,怎么编译,可以baidu之,或者自己研究,这个过程要下载php的源码包和二进制包(最好版本一致).<br />
编译成了dll之后修改php.ini,加一行:<br />
extension=vld.dll<br />
像普通扩展一样加载这个扩展.调用vld的方法如下:<br />
C:\Documents and Settings\Administrator.TEST1111&gt;php -dvld.active=1 d:\\1.php<br />
Failed loading php_xdebug.dll<br />
Branch analysis from position: 12647312<br />
Return found<br />
filename:       D:\1.php<br />
function name:  (null)<br />
number of ops:  4<br />
compiled vars:  !0 = $a<br />
line     #  op                           fetch          ext  return  operands<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
   2     0  ASSIGN                                                   !0, 1<br />
   3     1  ECHO                                                     !0<br />
   4     2  RETURN                                                   1<br />
         3* ZEND_HANDLE_EXCEPTION</p>
<p>1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aaa110110</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-2328</link>
		<dc:creator>aaa110110</dc:creator>
		<pubDate>Mon, 23 Nov 2009 07:16:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-2328</guid>
		<description>请问windows环境下面怎么得到opcode,以上代码怎么编译呢?</description>
		<content:encoded><![CDATA[<p>请问windows环境下面怎么得到opcode,以上代码怎么编译呢?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 雪候鸟</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-2283</link>
		<dc:creator>雪候鸟</dc:creator>
		<pubDate>Fri, 23 Oct 2009 02:51:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-2283</guid>
		<description>1. 编译的时候确定

2. 我不知道有什么办法, 或者你可以使用c的变量来做个中转. 在PHP_EMBED_START_BLOCK(argc,argv)中做为第二个参数的一部分传入, 通过SG(request_info).argv来访问.</description>
		<content:encoded><![CDATA[<p>1. 编译的时候确定</p>
<p>2. 我不知道有什么办法, 或者你可以使用c的变量来做个中转. 在PHP_EMBED_START_BLOCK(argc,argv)中做为第二个参数的一部分传入, 通过SG(request_info).argv来访问.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ddouble</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-2282</link>
		<dc:creator>ddouble</dc:creator>
		<pubDate>Fri, 23 Oct 2009 01:05:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-2282</guid>
		<description>现在已能够在c程序里嵌入php解释器，非常感谢，但还有几个问题不解，望赐教：

1.如何在嵌入的方式下指定自己的php.ini文件；
2.多个连续执行的 zend_eval_string之间无法延续变量作用域，所以前面的eval的变量，后面eval的语句中无法得到。</description>
		<content:encoded><![CDATA[<p>现在已能够在c程序里嵌入php解释器，非常感谢，但还有几个问题不解，望赐教：</p>
<p>1.如何在嵌入的方式下指定自己的php.ini文件；<br />
2.多个连续执行的 zend_eval_string之间无法延续变量作用域，所以前面的eval的变量，后面eval的语句中无法得到。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 雪候鸟</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-2281</link>
		<dc:creator>雪候鸟</dc:creator>
		<pubDate>Thu, 22 Oct 2009 07:39:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-2281</guid>
		<description>@ddouble 文档工作做的不好...确实没有你想要的.</description>
		<content:encoded><![CDATA[<p>@ddouble 文档工作做的不好&#8230;确实没有你想要的.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ddouble</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-2280</link>
		<dc:creator>ddouble</dc:creator>
		<pubDate>Thu, 22 Oct 2009 07:28:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-2280</guid>
		<description>到处找zend_api的资料，想把php解释器嵌入到c程序中，google上怎么也找不到。为啥zend网站上也没呢，还是完全没摸到门儿？

博主知道哪里有吗？zend api reference之类的文档，最好还有指南示例之类的文档。谢谢啦！</description>
		<content:encoded><![CDATA[<p>到处找zend_api的资料，想把php解释器嵌入到c程序中，google上怎么也找不到。为啥zend网站上也没呢，还是完全没摸到门儿？</p>
<p>博主知道哪里有吗？zend api reference之类的文档，最好还有指南示例之类的文档。谢谢啦！</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fybird</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-2254</link>
		<dc:creator>fybird</dc:creator>
		<pubDate>Sat, 03 Oct 2009 04:17:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-2254</guid>
		<description>对,直接就下载了一个5.3 没想到有bug.</description>
		<content:encoded><![CDATA[<p>对,直接就下载了一个5.3 没想到有bug.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 雪候鸟</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-2253</link>
		<dc:creator>雪候鸟</dc:creator>
		<pubDate>Sat, 03 Oct 2009 03:25:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-2253</guid>
		<description>你是用的PHP5.3吧?
是5.3的一个bug</description>
		<content:encoded><![CDATA[<p>你是用的PHP5.3吧?<br />
是5.3的一个bug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fybird</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-2252</link>
		<dc:creator>fybird</dc:creator>
		<pubDate>Fri, 02 Oct 2009 04:48:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-2252</guid>
		<description>我是在php_embed_init/shutdown 前加上了SAPI_SPI才通过的。ZEND_API不好使？不知道为什么</description>
		<content:encoded><![CDATA[<p>我是在php_embed_init/shutdown 前加上了SAPI_SPI才通过的。ZEND_API不好使？不知道为什么</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 雪候鸟</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-2199</link>
		<dc:creator>雪候鸟</dc:creator>
		<pubDate>Tue, 08 Sep 2009 06:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-2199</guid>
		<description>@leric 你需要用ZEND_API来修饰php_embed_init/shutdown. 符号可见性的问题.</description>
		<content:encoded><![CDATA[<p>@leric 你需要用ZEND_API来修饰php_embed_init/shutdown. 符号可见性的问题.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leric</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-2197</link>
		<dc:creator>Leric</dc:creator>
		<pubDate>Tue, 08 Sep 2009 06:22:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-2197</guid>
		<description>连接时总是报一个错误:
opcodes_dumper.cpp:(.text+0x910): undefined reference to `php_embed_init&#039;
opcodes_dumper.cpp:(.text+0x9e9): undefined reference to `php_embed_shutdown&#039;
collect2: ld returned 1 exit status
make: *** [ALL] Error 1

没用C做过什么东西,也不知道该咋解决,还望博主指点迷津</description>
		<content:encoded><![CDATA[<p>连接时总是报一个错误:<br />
opcodes_dumper.cpp:(.text+0&#215;910): undefined reference to `php_embed_init&#8217;<br />
opcodes_dumper.cpp:(.text+0&#215;9e9): undefined reference to `php_embed_shutdown&#8217;<br />
collect2: ld returned 1 exit status<br />
make: *** [ALL] Error 1</p>
<p>没用C做过什么东西,也不知道该咋解决,还望博主指点迷津</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackywdx</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-1736</link>
		<dc:creator>jackywdx</dc:creator>
		<pubDate>Sat, 16 May 2009 17:16:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-1736</guid>
		<description>呵呵,终于看懂了.</description>
		<content:encoded><![CDATA[<p>呵呵,终于看懂了.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-278</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 06 Nov 2008 02:09:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-278</guid>
		<description>看不懂..菜啊</description>
		<content:encoded><![CDATA[<p>看不懂..菜啊</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-277</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 06 Nov 2008 02:08:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-277</guid>
		<description>fxgh</description>
		<content:encoded><![CDATA[<p>fxgh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: snowrui</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-191</link>
		<dc:creator>snowrui</dc:creator>
		<pubDate>Fri, 26 Sep 2008 01:25:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-191</guid>
		<description>学习消化中......</description>
		<content:encoded><![CDATA[<p>学习消化中&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 雪候鸟</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-184</link>
		<dc:creator>雪候鸟</dc:creator>
		<pubDate>Thu, 25 Sep 2008 03:54:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-184</guid>
		<description>svn: http://code.google.com/p/opcodesdumper/source/browse/#svn/trunk
放进去了</description>
		<content:encoded><![CDATA[<p>svn: <a href="http://code.google.com/p/opcodesdumper/source/browse/#svn/trunk" rel="nofollow">http://code.google.com/p/opcodesdumper/source/browse/#svn/trunk</a><br />
放进去了</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: surfchen</title>
		<link>http://www.laruence.com/2008/09/23/539.html/comment-page-1#comment-183</link>
		<dc:creator>surfchen</dc:creator>
		<pubDate>Thu, 25 Sep 2008 02:52:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=539#comment-183</guid>
		<description>google code的svn里还没源代码呢</description>
		<content:encoded><![CDATA[<p>google code的svn里还没源代码呢</p>
]]></content:encoded>
	</item>
</channel>
</rss>
