PHP Class yii\console\controllers\ServeController

In order to access server from remote machines use 0.0.0.0:8000. That is especially useful when running server in a virtual machine.
Since: 2.0.7
Author: Alexander Makarov ([email protected])
Inheritance: extends yii\console\Controller
Datei anzeigen Open project: yiisoft/yii2

Public Properties

Property Type Description
$docroot path or path alias to directory to serve
$port port to serve on.
$router path to router script. See https://secure.php.net/manual/en/features.commandline.webserver.php

Public Methods

Method Description
actionIndex ( string $address = 'localhost' ) : integer Runs PHP built-in web server
optionAliases ( )
options ( $actionID )

Protected Methods

Method Description
isAddressTaken ( string $address ) : boolean

Method Details

actionIndex() public method

Runs PHP built-in web server
public actionIndex ( string $address = 'localhost' ) : integer
$address string address to serve on. Either "host" or "host:port".
return integer

isAddressTaken() protected method

protected isAddressTaken ( string $address ) : boolean
$address string server address
return boolean if address is already in use

optionAliases() public method

Since: 2.0.8
public optionAliases ( )

options() public method

public options ( $actionID )

Property Details

$docroot public_oe property

path or path alias to directory to serve
public $docroot

$port public_oe property

port to serve on.
public $port

$router public_oe property

path to router script. See https://secure.php.net/manual/en/features.commandline.webserver.php
public $router