将 php 扩展(geoip.so)添加到 Zend Studio 以进行代码验证
这里有一个简短的问题。我刚刚使用 pecl 将新的 php 扩展 (geoip.so) 安装到 /usr/local/zend/lib/php_extensions/ 并将扩展添加到 php.ini 中。 运行代码,它工作得很好。但 Zend Studio 发出未定义 geoip 函数的警告。 尝试将上面的目录路径添加到Zend Studio的include路径中,警告仍然存在。 有任何线索如何删除此警告吗? 先感谢您!!
/奥古斯丁
just have a short question here. I've just installed new php extension (geoip.so) using pecl to /usr/local/zend/lib/php_extensions/ and added the extension to the php.ini.
Run the code and it works just fine. But Zend Studio is giving warning of undefined geoip function.
Try to add the directory path above to the include path of Zend Studio, still the warning exists.
Any clue how to remove this warning?
Thank you in advance!!
/Agustinus
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过将带有存根函数描述的 PHP 文件放入特殊目录来向 Studio 添加函数。通过以下方式在文件系统中找到该目录:编写类似 gmdate() 的内容,选择名称并按 F3。您将被带到原型文件之一。请记下此文件所在的目录(如果将鼠标悬停在选项卡上,则显示在顶部)。现在,您需要为缺少的函数创建存根,就像您正在查看的函数一样。通常,您可以将它们放入任何文件中,但我建议将它们放入单独的文件中 - 例如 geoip.php - 并将该文件放入该目录中。
如果您需要如何正确执行此操作的示例,您可能还需要右键单击/在 PHP 资源管理器中显示并浏览其他原型文件。
You can add functions to Studio by putting PHP files with stub function descriptions into special directory. Find this directory in filesystem in a following way: write something like gmdate(), select the name and press F3. You will be taken to one of the prototype files. Note the directory where this file resides (shown on the top and if you hover over the tab). Now you need to create stubs for functions you are missing just like the one you're looking at. You can put them into any file, generally, but I suggest putting them into separate file - like geoip.php - and put this file into that directory.
You may also want to do right-click/Show In/PHP Explorer and browse other prototype files if you need examples of how to do it right.