开发者

Phalanger and Zendframework

开发者 https://www.devze.com 2023-04-13 05:36 出处:网络
Zend framework is just a collection of PHP classes. Phalanger is a complete PHP compiler. So why I can not portZend Framework-based application to Phalanger??

Zend framework is just a collection of PHP classes.

Phalanger is a complete PHP compiler.

So why I can not port Zend Framework-based application to Phalanger??

I got the following error whene I run the app in Phalanger:

line 13:

includePaths.library = APPLICATION_PATH "/../library"

error:

<b>Error</b>: Uncaught exception 'Zend_Config_Exception' with message 'Parse error on line 13' in D:\www\mehr-phalanger\library\Zend\Config\Ini.php:215:13
Stack trace:
#11 : Process
#10 : ProcessRequest
#9 : ProcessRequestNoDemand
#8 : ProcessRequestInternal
#7 : System.Web.IHttpAsyncHandler.BeginProcessRequest
#6 : ResumeSteps
#5 : ExecuteStep
#4 : System.Web.HttpApplication.IExecutionStep.Execute
#3 : <Main>
#2 D:\www\mehr-phalanger\public\index.ph开发者_开发技巧p(40,1): Zend_Config_Ini->__construct
#1 D:\www\mehr-phalanger\library\Zend\Config\Ini.php(215,13): Zend_Config_Ini->_loadIniFile
#0 D:\www\mehr-phalanger\library\Zend\Config\Ini.php(215,13): Zend_Config_Ini->_parseIniFile
#12 {main}.<br/><br/> 


you have to use the extended path remove APPLICATION_PATH and put the full directory


First; you have a syntax error in your code, you miss "." (dot) between APPLICATION_PATH and "/../library"

Second; Phalanger will be able to compile ZendFramework (ZF), however it does not support some functions that ZF uses. You can either report issue https://github.com/devsense/phalanger/issues or take a look on Peachpie (github.com/iolevel/peachpie) which is reincarnation and successor of Phalanger, and report the issue there


Humm, isn't phallanger a translator for PHP => .NET that compiles your source into dotnet code? I might be wrong but i remember trying that out quite some time ago out of curiosity.

EDIT: No i looked it up it's a language library for dotnet. It allows you to code .NET using PHP style syntax. Therefore you won't be able to use ZendFramework in there, you are coding ASP.NET but using PHP syntax. Don't expect anything from php to work in there...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号