将 zend studio 与 codeigniter 结合使用
我想使用 Zend Studio 来构建一个基于 CodeIgniter 的项目。但我希望能够使用 Zend 的调试功能。因此,我似乎无法让调试器正常工作,因为它不“理解”codeigniter。那么,为了使设置正常工作,我是否需要安装 Zend 服务器,以便在服务器端完成调试?有人可以向我解释一下吗?谢谢。
I want to use Zend Studio for a project built on CodeIgniter. But I want to be able to use the debugging functionality of Zend. Because of that, I cant seem to get the debugger to work properly cause it doesnt "understand" codeigniter. So, in order for the setup to work, do I need to install Zend server, so that the debugging is done serverside? Can someone explain this to me a bit? Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如 Iraklis 所说,论坛有答案,为了节省人们额外的搜索,这对我有用:
第 1 步
添加:
并
到项目包含的文件中(为每个文件创建一个新文件,以确保安全并确保包含它)在构建路径中)
第 2 步
重新构建以确保 eclipse/zend 知道更改。
难以忽视的事实:
不幸的是,这不适用于视图变量,仅适用于
$this->
调用,因为 Codeigniter 使用arrays
来存储变量名称
code>,因此 eclipse/zend 需要运行代码才能看到它们。为了使自动检测变得更加困难,这是跨文件完成的,并且文件名是使用变量设置的。这是一个例子:
在 views/controllers/file.php 中,你输入:
在 views/foo.php 中,你得到:
但这就是 codeigniter 的工作方式。
来源:
https://github.com/scoumbourdis/codeigniter-autocomplete/tree /master/application/libraries/fake
完整教程:
http://www.web-and-development.com/codeigniter-和-eclipse-自动完成/
As Iraklis said, the forum had the answer, to save people some extra searching, here's what worked for me:
Step 1
add:
and
into files included by your project (create a new file for each just to be safe and make sure it's included in build path)
Step 2
Rebuild to make sure eclipse/zend is aware of the change.
The inconvenient truth:
Unfortunately this won't work for views variables, only for
$this->
calls, because Codeigniter usesarrays
to storevariable names
, so eclipse/zend would need to be running the code in order to see them. And to make things even harder to detect automatically, this is done cross-file and the filename is set using a variable.here is one example:
in views/controllers/file.php you put:
in views/foo.php you get:
But this is just the way codeigniter works.
source:
https://github.com/scoumbourdis/codeigniter-autocomplete/tree/master/application/libraries/fake
full tutorial:
http://www.web-and-development.com/codeigniter-and-eclipse-autocomplete/
我建议您搜索 codeigniter 的论坛。那里有一些讨论 Zend 集成的线程。
I would advise you to search codeigniter's forum. There are a few threads there discussing Zend integration.