L
L
Leopandro2016-03-16 14:52:13
Yii
Leopandro, 2016-03-16 14:52:13

How can I make the script run on every request?

I need a PHP script to be executed on each request, how can I do this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
maks280795, 2016-03-16
@maks280795

Include it via require / require_once or include / include_once (read the feature differences in the require docs).
Or execute via shell_exec .

B
Beaten_Sect0r, 2016-03-19
@Beaten_Sect0r

To config

'as beforeAction' => [
    'class' => '...',
],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question