Demos para ilustrar uso de los utilitarios miframe_server()
y miframe_autoload()
de la librería miFrame\Commons
Variables usadas para crear el arreglo de muestra:
Importante: Algunos valores se han ocultado por seguridad.
$path_dummy | => | '../path/to/other/script/ignora/..' |
$script | => | '[DOCUMENT_ROOT]/software/miframe-commons/demo/support/demo-server.php' |
Arreglo de muestra:
miframe_server()->startAt() | => | 1734911699.2037 |
miframe_server()->startAt('Y/m/d H:i:s') | => | '2024/12/22 18:54:59' |
miframe_server()->checkPoint() [Inicio] | => | 0.0439858 |
miframe_server()->purgeURLPath($path_dummy) | => | '/path/to/other/script' |
miframe_server()->purgeFilename($path_dummy) | => | '/path/to/other/script' |
miframe_server()->get('REQUEST_METHOD') | => | 'GET' |
miframe_server()->client() | => | '3.145.105.85' |
miframe_server()->isWeb() | => | true |
miframe_server()->useHTTPSecure() | => | true |
miframe_server()->isLocalhost() | => | false |
miframe_server()->software() | => | '[Restringido]' |
miframe_server()->browser() | => | '[Restringido]' |
miframe_server()->rawInput() | => | '' |
miframe_server()->name() | => | '[Restringido]' |
miframe_server()->ip() | => | '45.56.67.215' |
miframe_server()->path() | => | '/software/miframe-commons/demo/support/demo-server.php' |
miframe_server()->pathInfo() | => | '' |
miframe_server()->host() | => | 'https://lekosdev.com/' |
miframe_server()->host(true) | => | 'https://lekosdev.com/' |
miframe_server()->self() | => | '/software/miframe-commons/demo/support/demo-server.php' |
miframe_server()->relativePath() | => | '/software/miframe-commons/demo/support/' |
miframe_server()->relativePath($path_dummy) | => | '/software/miframe-commons/demo/support/path/to/other/script' |
miframe_server()->documentRoot() | => | '[DOCUMENT_ROOT]/' |
miframe_server()->documentRoot($path_dummy) | => | '[DOCUMENT_ROOT]/path/to/other/script' |
miframe_server()->documentRootSpace() | => | 83400716288 |
miframe_server()->script() | => | '[DOCUMENT_ROOT]/software/miframe-commons/demo/support/demo-server.php' |
miframe_server()->scriptDirectory() | => | '[DOCUMENT_ROOT]/software/miframe-commons/demo/support/' |
miframe_server()->scriptDirectory($path_dummy) | => | '[DOCUMENT_ROOT]/software/miframe-commons/demo/support/path/to/other/script' |
miframe_server()->removeDocumentRoot($script) | => | 'software/miframe-commons/demo/support/demo-server.php' |
miframe_server()->removeDocumentRoot($path_dummy) | => | false |
miframe_server()->tempDir() | => | '[TEMP_DIR]/' |
miframe_server()->tempDirSpace() | => | 83400716288 |
miframe_server()->hasAccessTo($path_dummy) | => | false |
miframe_server()->hasAccessTo($script) | => | true |
miframe_server()->mkdir($path_dummy) | => | false |
miframe_server()->createTempSubdir($path_dummy) | => | '[TEMP_DIR]/path/to/other/script' |
miframe_server()->executionTime() | => | 0.070003032684326 |
miframe_server()->checkPoint() [Fin] | => | 0.026031 |
Respecto al uso de la librería autoload.php
, estas son las Clases evaluadas durante esta presentación:
miFrame\Commons\Core\ServerData | => | '[DOCUMENT_ROOT]/software/miframe-commons/src/miframe/commons/core/ServerData.php' |
miFrame\Commons\Traits\GetLocalData | => | '[DOCUMENT_ROOT]/software/miframe-commons/src/miframe/commons/traits/GetLocalData.php' |
Y estos son los namespaces registrados:
miframe\commons\* | => | '[DOCUMENT_ROOT]/software/miframe-commons/src/miframe/commons/*.php' |