[PHP-DEV] ? calling a module function from another module... From: Marc Boeren (M.Boeren <email protected>)
Date: 01/08/01

Hi!

How do I call a function from another module from within my own module?

I can find the module entry and the function names, but I'm new to
php-development so I'm not sure what to do next to actually call the
function (with parameters etc...)
This is what I've got so far:

[...]
if (zend_hash_find(&module_registry, "mysql", strlen("mysql")+1,
(void**)&module) == FAILURE) {
    return;
    }

array_init(return_value);
func = module->functions;
while(func->fname) {
    add_next_index_string(return_value, func->fname, 1);
    if (!strcmp(func->fname, "mysql_connect")) {
/* func->handler(); // this doesn't work yet, I'm not sure how this
is done */
        }
    }
[...]

Thanks & Cheerio, Marc.

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>