Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
Undefined Variable...
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="necm1" data-source="post: 284004" data-attributes="member: 42393"><p>Good day dear community, I currently have a small problem. I always get the following error message: Notice: Undefined variable: index in C: \ xampp \ htdocs \ tpl \ ghost \ index.tpl.php on line 51</p><p></p><p>I use the template system of Quckstar. I have in my index.php the following code:</p><p>[CODE]<?php</p><p></p><p>/**</p><p>* @author Madly</p><p>* @copyright 2014</p><p>*/</p><p></p><p>include("config.php");</p><p></p><p>//Index Template laden</p><p>$tpl->page("index");</p><p>$tpl->display();</p><p>$index = new Main($mysqli);</p><p>?>[/CODE]</p><p></p><p>And in my index.tpl.php (line 51):</p><p>[CODE]<?php</p><p>foreach($index->getAllNews("2") as $n) {</p><p>?></p><p><article class="post tag"></p><p><header class="post-header"></p><p><h2 class="post-title"><a href="/post/<?php echo $n['postID']; ?>"><?php echo $n['postTitle']; ?></a></h2></p><p><section class="post-meta"></p><p><img class="author-img" src="<?php echo $n['postAuthorImage']; ?>" alt="Author image"/></p><p><span class="author-name"><?php echo $n['postAuthor']; ?></span></p><p>&bull;</p><p><time datetime="<?php echo date("d M Y", $n['postDate']); ?>"><?php echo date("d M Y", $n['postDate']); ?></time></p><p></section></p><p></header></p><p><section class="post-excerpt"></p><p><?php echo $n['postShortText']; ?></p><p></section></p><p><footer class="more-links"></p><p><a class="read-more button-save" href="/post/<?php echo $n['postID']; ?>">Weiterlesen</a></p><p></footer></p><p></article></p><p><?php } ?>[/CODE]</p><p></p><p>TPL System: <a href="http://pastebin.com/A6Q4GhLu" target="_blank">http://pastebin.com/A6Q4GhLu</a></p><p>Where is the mistake? : S</p><p></p><p>EDIT: Funny, the define BLOG_SITENAME he gets from the config. : S</p></blockquote><p></p>
[QUOTE="necm1, post: 284004, member: 42393"] Good day dear community, I currently have a small problem. I always get the following error message: Notice: Undefined variable: index in C: \ xampp \ htdocs \ tpl \ ghost \ index.tpl.php on line 51 I use the template system of Quckstar. I have in my index.php the following code: [CODE]<?php /** * @author Madly * @copyright 2014 */ include("config.php"); //Index Template laden $tpl->page("index"); $tpl->display(); $index = new Main($mysqli); ?>[/CODE] And in my index.tpl.php (line 51): [CODE]<?php foreach($index->getAllNews("2") as $n) { ?> <article class="post tag"> <header class="post-header"> <h2 class="post-title"><a href="/post/<?php echo $n['postID']; ?>"><?php echo $n['postTitle']; ?></a></h2> <section class="post-meta"> <img class="author-img" src="<?php echo $n['postAuthorImage']; ?>" alt="Author image"/> <span class="author-name"><?php echo $n['postAuthor']; ?></span> • <time datetime="<?php echo date("d M Y", $n['postDate']); ?>"><?php echo date("d M Y", $n['postDate']); ?></time> </section> </header> <section class="post-excerpt"> <?php echo $n['postShortText']; ?> </section> <footer class="more-links"> <a class="read-more button-save" href="/post/<?php echo $n['postID']; ?>">Weiterlesen</a> </footer> </article> <?php } ?>[/CODE] TPL System: [URL]http://pastebin.com/A6Q4GhLu[/URL] Where is the mistake? : S EDIT: Funny, the define BLOG_SITENAME he gets from the config. : S [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
Undefined Variable...
Top