Autor | Zpráva | ||
---|---|---|---|
nyllo Profil |
#1 · Zasláno: 6. 6. 2016, 07:53:28
Dobrý den,
snažím se vytvořit louder který byde načítat šablonu. Chybu mi to žádnou nedává, ale šablonu to také nenačte. index $themeLoad = new presentRouter(THEME_folder_path . THEME_name); $themeLoad->present__view(THEME_class) presentRouter.php class presentRouter extends Router { private $themeFolder; private $themeClass; public function __construct($themeFolder) { $this->themeFolder = $themeFolder; } public function present__view($themeClass) { $this->themeClass = $themeClass; include($this->themeFolder . "/" . $this->themeClass . ".phtml"); } } |
||
Jan Tvrdík Profil |
#2 · Zasláno: 6. 6. 2016, 08:09:39
nyllo:
Ten kód vypadá dobře, zkus si explicitně zapnout zobrazování chyb error_reporting(E_ALL); ini_set('display_errors', '1'); |
||
nyllo Profil |
Mám zapnuté a opravdu nic.
dám sem ještě celý index error_reporting(E_ALL); ini_set('display_errors', '1'); mb_internal_encoding("UTF-8"); function function__autoload($class) { if (preg_match('/Router$/', $class)) require("apps/router/" . $class . ".php"); } spl_autoload_register("function__autoload"); $configLoad = new configRouter; $configLoad->config__loader(); $libLoad = new libRouter; $libLoad->lib__loader('Facebook/autoload'); $fb = new Facebook\Facebook([ 'app_id' => FB_app_id, 'app_secret' => FB_app_secret, 'default_graph_version' => FB_default_graph_version, ]); try { $response = $fb->get('/'.FB_page_id.'?fields='.FB_graph_api_fields.'', FB_user_token); } catch(Facebook\Exceptions\FacebookResponseException $e) { echo 'Graph vratil chybu: ' . $e->getMessage(); exit; } catch(Facebook\Exceptions\FacebookSDKException $e) { echo 'Facebook SDK vratil chybu: ' . $e->getMessage(); exit; } $graphNode = $response->getGraphNode(); $page = $response->getGraphPage(); $themeLoad = new presentRouter(THEME_folder_path . THEME_name); $themeLoad->present__view(THEME_class); Zjistil jsem že cokoliv za $themeLoad se nezobrazí a nefunguje.
$themeLoad = new presentRouter(THEME_folder_path . THEME_name); $themeLoad->present__view(THEME_class); |
||
visionic Profil * |
#4 · Zasláno: 7. 6. 2016, 15:54:30
Nejsem odborník, možná jen neznalost něčeho s čím jsem se nesetkal.
není chyba zde?: include($this->themeFolder . "/" . $this->themeClass . ".phtml"); na include($this->themeFolder . "/" . $this->themeClass . ".html"); |
||
Jan Tvrdík Profil |
#5 · Zasláno: 7. 6. 2016, 16:28:54
visionic:
nn, v tom kódu co poslal žádná chyba není |
||
Davex Profil |
nyllo:
Co obsahují konstanty THEME_folder_path a THEME_name ?
|
||
aDAm Profil |
#7 · Zasláno: 8. 6. 2016, 08:13:04
co je v tom includovaném souboru?
|
||
Časová prodleva: 8 let
|
0