$source = file_get_contents($url);
file_get_contents [internal], line ?? App\Controller\IconController::pretraga() /home/zoki/public_html/src/Controller/IconController.php, line 296 Cake\Controller\Controller::invokeAction() /home/zoki/public_html/vendor/cakephp/cakephp/src/Controller/Controller.php, line 547 Cake\Controller\ControllerFactory::handle() /home/zoki/public_html/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 139 Cake\Controller\ControllerFactory::invoke() /home/zoki/public_html/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 114 Cake\Http\BaseApplication::handle() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/BaseApplication.php, line 320 Cake\Http\Runner::handle() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 77 Cake\Http\Middleware\CsrfProtectionMiddleware::process() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php, line 164 Cake\Http\Runner::handle() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 73 Cake\Http\Middleware\BodyParserMiddleware::process() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/Middleware/BodyParserMiddleware.php, line 157 Cake\Http\Runner::handle() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 73 Cake\Routing\Middleware\RoutingMiddleware::process() /home/zoki/public_html/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php, line 186 Cake\Http\Runner::handle() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 73 Cake\Routing\Middleware\AssetMiddleware::process() /home/zoki/public_html/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php, line 68 Cake\Http\Runner::handle() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 73 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/zoki/public_html/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 131 Cake\Http\Runner::handle() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 73 Cake\Http\Runner::run() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 58 Cake\Http\Server::run() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/Server.php, line 90 require /home/zoki/public_html/webroot/index.php, line 40 [main] /home/zoki/public_html/index.php, line 16
$message = "Unable to emit headers. Headers sent in file=$file line=$line";
trigger_error($message, E_USER_WARNING);
}
Cake\Http\ResponseEmitter::emit() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 71 Cake\Http\Server::emit() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/Server.php, line 128 require /home/zoki/public_html/webroot/index.php, line 40 [main] /home/zoki/public_html/index.php, line 16
$response->getStatusCode(),
($reasonPhrase ? ' ' . $reasonPhrase : '')
));
header [internal], line ?? Cake\Http\ResponseEmitter::emitStatusLine() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 168 Cake\Http\ResponseEmitter::emit() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 74 Cake\Http\Server::emit() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/Server.php, line 128 require /home/zoki/public_html/webroot/index.php, line 40 [main] /home/zoki/public_html/index.php, line 16
foreach ($values as $value) {
header(sprintf(
'%s: %s',
header [internal], line ?? Cake\Http\ResponseEmitter::emitHeaders() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 197 Cake\Http\ResponseEmitter::emit() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 75 Cake\Http\Server::emit() /home/zoki/public_html/vendor/cakephp/cakephp/src/Http/Server.php, line 128 require /home/zoki/public_html/webroot/index.php, line 40 [main] /home/zoki/public_html/index.php, line 16
* @throws InvalidArgumentException if parameter 3 is not a string |
|
* @throws InvalidArgumentException if parameter 4 is not an integer or null |
|
* @throws RuntimeException if the document type is invalid (not Document::TYPE_HTML or Document::TYPE_XML) |
|
*/ |
|
public function load(string $string, bool $isFile = false, string $type = Document::TYPE_HTML, int $options = null): void |
|
{ |
|
if ( ! in_array(strtolower($type), [Document::TYPE_HTML, Document::TYPE_XML], true)) { |
|
throw new RuntimeException(sprintf('Document type must be "xml" or "html", %s given.', $type)); |
|
} |
|
|
$this->preserveWhiteSpace(false); |
|
|
|
if ($string !== null) { |
|
$this->load($string, $isFile, $type); |
|
} |
|
} |
|
|
|
/** |
// ); |
|
|
|
|
|
|
|
$document = new Document($source); |
|
|
|
|
|
|
|
if ($kategorija) { |
* @throws \UnexpectedValueException If return value of action is not `null` or `ResponseInterface` instance. |
|
*/ |
|
public function invokeAction(Closure $action, array $args): void |
|
{ |
|
$result = $action(...$args); |
|
if ($result !== null && !$result instanceof ResponseInterface) { |
|
throw new UnexpectedValueException(sprintf( |
|
'Controller actions can only return ResponseInterface instance or null. ' |
|
. 'Got %s instead.', |
$args = $this->getActionArgs( |
|
$action, |
|
array_values((array)$controller->getRequest()->getParam('pass')) |
|
); |
|
$controller->invokeAction($action, $args); |
|
|
|
$result = $controller->shutdownProcess(); |
|
if ($result instanceof ResponseInterface) { |
|
return $result; |
|
|
return $runner->run($middlewareQueue, $controller->getRequest(), $this); |
|
} |
|
|
|
return $this->handle($controller->getRequest()); |
|
} |
|
|
|
/** |
|
* Invoke the action. |
} |
|
|
|
$controller = $this->controllerFactory->create($request); |
|
|
|
return $this->controllerFactory->invoke($controller); |
|
} |
|
} |
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
|
} |
|
|
|
return new Response([ |
|
'body' => 'Middleware queue was exhausted without returning a response ' |
if ($method === 'GET' && $cookieData === null) { |
|
$token = $this->createToken(); |
|
$request = $request->withAttribute('csrfToken', $this->saltToken($token)); |
|
/** @var mixed $response */ |
|
$response = $handler->handle($request); |
|
|
|
return $this->_addTokenCookie($token, $request, $response); |
|
} |
|
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
*/ |
|
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
if (!in_array($request->getMethod(), $this->methods, true)) { |
|
return $handler->handle($request); |
|
} |
|
[$type] = explode(';', $request->getHeaderLine('Content-Type')); |
|
$type = strtolower($type); |
|
if (!isset($this->parsers[$type])) { |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
); |
|
} |
|
$matching = Router::getRouteCollection()->getMiddleware($middleware); |
|
if (!$matching) { |
|
return $handler->handle($request); |
|
} |
|
|
|
$middleware = new MiddlewareQueue($matching); |
|
$runner = new Runner(); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
$url = $request->getUri()->getPath(); |
|
if (strpos($url, '..') !== false || strpos($url, '.') === false) { |
|
return $handler->handle($request); |
|
} |
|
|
|
if (strpos($url, '/.') !== false) { |
|
return $handler->handle($request); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
*/ |
|
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
try { |
|
return $handler->handle($request); |
|
} catch (RedirectException $exception) { |
|
return $this->handleRedirect($exception); |
|
} catch (Throwable $exception) { |
|
return $this->handleException($exception, $request); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
$this->queue = $queue; |
|
$this->queue->rewind(); |
|
$this->fallbackHandler = $fallbackHandler; |
|
|
|
return $this->handle($request); |
|
} |
|
|
|
/** |
|
* Handle incoming server request and return a response. |
} |
|
|
|
$this->dispatchEvent('Server.buildMiddleware', ['middleware' => $middleware]); |
|
|
|
$response = $this->runner->run($middleware, $request, $this->app); |
|
|
|
if ($request instanceof ServerRequest) { |
|
$request->getSession()->close(); |
|
} |
// Bind your application to the server. |
|
$server = new Server(new Application(dirname(__DIR__) . '/config')); |
|
|
|
// Run the request/response through the application and emit the response. |
|
$server->emit($server->run()); |
|
|
* @since 0.10.0 |
|
* @license https://opensource.org/licenses/mit-license.php MIT License |
|
*/ |
|
|
|
require 'webroot' . DIRECTORY_SEPARATOR . 'index.php'; |
|
|
If you want to customize this error message, create templates/Error/error500.php