} // Backtrack some directories for ($i = 0; $i < $backtrackamount + 1; $i++) { $path = substr($path, 0, strrpos($path, "/")); } $path = $path . "/" . $filepath; // Make it an absolute path } elseif ((strpos($path, ":/") === false || strpos($path, ":/") > 10) && !is_file($path)) { // It is a local link if (substr($path, 0, 1) == "/") { $tr = parse_url($basepath); // mPDF 5.7.2 $root = ''; if (!empty($tr['scheme'])) { $root .= $tr['scheme'] . '://';
for ($i = 0; $i < $backtrackamount + 1; $i++) { $path = substr($path, 0, strrpos($path, "/")); } $path = $path . "/" . $filepath; // Make it an absolute path } elseif ((strpos($path, ":/") === false || strpos($path, ":/") > 10) && !is_file($path)) { // It is a local link if (substr($path, 0, 1) == "/") { $tr = parse_url($basepath); // mPDF 5.7.2
} else { $path = ''; } if (trim($path) != '' && !(stristr($e, "src=") !== false && substr($path, 0, 4) == 'var:') && substr($path, 0, 1) != '@') { $path = htmlspecialchars_decode($path); // mPDF 5.7.4 URLs $orig_srcpath = $path; $this->GetFullPath($path); $regexp = '/ (href|src)="(.*?)"/i'; $e = preg_replace($regexp, ' \\1="' . $path . '"', $e); } }//END of Fix path values // Extract attributes $contents = [];
foreach ($this->methods as $method => $param) { $this->execute($method, $param); } } if (!empty($css)) { $api->WriteHTML($css, 1); $api->WriteHTML($content, 2); } else { $api->WriteHTML($content); } if ($pdfAttachments) { $api->SetImportUse(); $api->SetHeader(null);
* * @return mixed * @throws InvalidConfigException */ public function render() { return $this->output($this->content, $this->filename, $this->destination); } /** * Validates and fetches the Mpdf API instance. * * @return Mpdf
'SetHeader'=>[Yii::t('app', 'Referto partita').' '.$model->numero.' '.$model->manifestazione->nome], 'SetFooter'=>['{PAGENO}'], ] ]); // return the pdf output as per the destination setting return $pdf->render(); } /** * Finds the Partite model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown.
$args = $this->controller->bindActionParams($this, $params); Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); if ($oldController !== null) { Yii::$app->controller = $oldController; } return $result; }
$params = $this->catchAll; unset($params[0]); } try { Yii::debug("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } $response = $this->getResponse(); if ($result !== null) {
{ try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
require(__DIR__ . '/_protected/common/config/main-local.php'), require(__DIR__ . '/_protected/frontend/config/main.php'), require(__DIR__ . '/_protected/frontend/config/main-local.php') ); $application = new yii\web\Application($config); $application->run();
$_GET = [ 'id' => '51', ]; $_SESSION = [ '__flash' => [], '_language' => 'en', ];