Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

I want to achieve request_startup_func in Zephir, should be how to deal with?

I want to achieve request_startup_func in Zephir, should be how to deal with?

Could you please explain a bit more?



4.5k
edited Jul '16

I would like to request the beginning of the time, to determine whether the domain name authorization?

so I want to realize request_startup_func in Zephir,



4.5k

I want to get the SERVER['SERVERNAME'] and can't not change .

$SERVER['SERVERNAME']='test';

$obj=new \Phalcon\Http\Request(); echo $obj->getServerName();

print "test";

so I want to get the $SERVER['SERVERNAME'] in the request beginning to deny the users change.



5.9k
Accepted
answer

Zephir:

_SERVER["SERVERNAME"]; // If it exists

PHP:

$_SERVER["SERVERNAME"]; // If it exists