This repository has been archived on 2018-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
OpenSQLManager/OpenSQLManager.c

32 lines
742 B
C
Raw Normal View History

/**
* OpenSQLManager
*
* Free Database manager for Open Source Databases
*
* @package OpenSQLManager
* @author Timothy J. Warren
* @copyright Copyright (c) 2012
* @link https://github.com/aviat4ion/OpenSQLManager
* @license https://timshomepage.net/dbaj.txt
*/
/**
* Wrapper program for embeded php
*/
#include <sapi/embed/php_embed.h>
int main(int argc, char *argv[])
2012-11-28 10:11:03 -05:00
{
PHP_EMBED_START_BLOCK(argc,argv)
2012-12-03 14:13:22 -05:00
/* Change extension directory */
2012-12-04 18:52:54 -05:00
zend_alter_ini_entry("extension_dir", sizeof("extension_dir"), "./", sizeof("./"), PHP_INI_ALL, PHP_INI_STAGE_RUNTIME);
2012-11-28 10:11:03 -05:00
zend_eval_string(" \
chdir(dirname($argv[0])); \
require ('OpenSQLManager.php'); \
", NULL, "TEST" TSRMLS_CC);
PHP_EMBED_END_BLOCK()
return 0;
}