This topic is locked

Any scripts runs at startup ?

8/12/2017 8:53:18 PM
PHPRunner General questions
Z
Zerobaka author

I notice this event 'After application initialized' / function AfterAppInit.
the explanation says, it executed in the beginning of each page before any processing takes place.
Now i need an event script which is runs in beginning of the whole application (project startup),

so it only run once whenever the app started.
I cannot find it. So, is PHPrunner really not prepare something like that?

W
wehaye 8/12/2017



I notice this event 'After application initialized' / function AfterAppInit.
the explanation says, it executed in the beginning of each page before any processing takes place.
Now i need an event script which is runs in beginning of the whole application (project startup),

so it only run once whenever the app started.
I cannot find it. So, is PHPrunner really not prepare something like that?


You can use session in your script with IF statement. If session not valid, run script. If session valid, ignore script.

In script, you declaration the session.

Z
Zerobaka author 8/13/2017



You can use session in your script with IF statement. If session not valid, run script. If session valid, ignore script.

In script, you declaration the session.


Thanks, but I am unfamiliar with session programming.
Btw, I just notice this function AfterSuccessfulLogin of Login page, the explanation is:

executed on the login page after username and password successfully verified.
I think it almost fits to my purpose, since it runs once every successful logins,

right?