Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. Controllers
  2. |__ posts
  3. |__ post.php
  4.  
  5. views
  6. |__ welcome_message.php
  7. |__ home.php
  8.  
  9. <!DOCTYPE html>
  10. <html lang="en">
  11. <head>
  12. <meta charset="utf-8">
  13. <title>Welcome to CodeIgniter</title>
  14. </head>
  15. <body>
  16. <a href="<?php echo site_url("posts/post/posts_controller"); ?>">link</a>
  17. </body>
  18. </html>
  19.  
  20. <!DOCTYPE html>
  21. <html lang="en">
  22. <head>
  23. <meta charset="utf-8">
  24. <title>Welcome to CodeIgniter Link Page</title>
  25. </head>
  26. <body>
  27.  
  28. <div id="container">
  29. <h1>This is the link page</h1>
  30.  
  31. <div id="body">
  32. <p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds</p>
  33. </div>
  34. </div>
  35.  
  36. </body>
  37. </html>
  38.  
  39. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  40.  
  41. class Welcome extends CI_Controller {
  42.  
  43. public function __construct()
  44. {
  45. parent::__construct();
  46. $this->load->helper('url');
  47. }
  48.  
  49. public function index()
  50. {
  51. $this->load->view('welcome_message');
  52. }
  53. }
  54.  
  55. <?php
  56.  
  57. Class Post extends CI_Controller
  58. {
  59. public function __construct()
  60. {
  61. parent::__construct();
  62. $this->load->helper('url');
  63. }
  64.  
  65. public function posts_controller()
  66. {
  67. $this->load->view('home');
  68. }
  69.  
  70. }
  71. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement