This topic is locked
[SOLVED]

 How to use PHPRunner functions in external script

3/7/2020 9:01:33 AM
PHPRunner General questions
U
uli author

I need a (cronjob) script to do some work with the mySQL database used in PHPRunner. Housekeeping, statistics, sending some emails ....

I think it would be convenient to use the functions for database connection, data access (dal) already present in PHPRunner. Maybe somebody has done something similar and has kind of recipe what php files to include and how to employ these.

Thanks in advance for help.

Sergey Kornilov admin 3/7/2020

Placing your PHP file to the main folder with PHP files and adding the following line in the beginning of your code will do the job:

include('include/dbcommon.php');


You can see how we do this in cron job files in templates like MassMailer and EmailReader.
More info:

https://xlinesoft.com/phprunner/docs/how_to_add_external_files.htm