Jump to content

Embedding PHP


steffc

Recommended Posts

int main(int argc, char** argv){

 

zend_executor_globals executor_globals;

 

PHP_EMBED_START_BLOCK(argc, argv);

//php_embed_init(argc, argv);

 

char *php_code = \"return \"This is a test\";\";

zval retval;

 

zend_eval_string(php_code, &retval, \"Embedded Code\" TSRMLS_CC);

 

PHP_EMBED_END_BLOCK();

//php_embed_shutdown();

return 0;

}

This is the code that I was using just to see if it would do anything but it would crash on the PHP_EMBED_START_BLOCK macro. I think it was the php_embed_init function that phpembed.c creates.

 

This is steffc!!

Link to comment
https://forums.phpfreaks.com/topic/1351-embedding-php/#findComment-4473
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.