从C返回Integer数组到PHP [英] returning Integer array to PHP from C

查看:79
本文介绍了从C返回Integer数组到PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨......我遇到了问题。


我尝试从C tp PHP返回一个整数数组,但无法获取值...我正在使用SWIG集成C和PHP。


我的.c看起来像。

Hi... I have got a problem.

I try to return a integer array from C tp PHP but unable to get the values back..I am using SWIG to integrate C and PHP.

My .c looks like.

展开 | 选择 | 换行 | 行号

推荐答案

你的PHP没有调用arr_ret()方法。
Your PHP doesn''t call the arr_ret() method.


抱歉标记......这是其他一些功能。 />

我的PHP看起来像,

Sorry mark...... That was some other function.

My PHP looks like,

展开 | 选择 | Wrap | 行号


我''我不知道 - 您最好在SWIG邮件列表/论坛上询问。


马克。


PS您是否尝试编写PHP(zend)扩展来包装C函数?这很容易。
I''ve no idea - you might better asking on a SWIG mailing list / forum.

Mark.

P.S. Have you tried writing a PHP (zend) extension to wrap the C functions? It''s pretty easy.


这篇关于从C返回Integer数组到PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆