Added: 10 months ago
From: phpacademy
Views: 15,043
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (17)

Sign In or Sign Up now to post a comment!
  • Wow, this is the most convoluted way of going about this I think I've ever seen. The point of it is maintaining fewer files to create multiple pages. This is somewhat backward.

  • hi im new to this need help im understanding the logic bu i have named my files same as your with the php on the end but the icons are not the same they are all php file and how are you getting to brows them im lost there can you help please

  • I coming to understand this tutorial here. :)

    Good job phpacademy. I just hate confusing.

  • while i understand the elegance of using dynamic pages, is it seo friendly is the real question. I won't shoot myself in the foot just to be able to do a pretty and nerdy trick.

    yes that was a question.

  • can i do it with content from a database

  • I keep getting Empty Arrays I put in scandir() and it isn't working, then I used the glob()

    and my arrays are empty

  • glob() is more efficient than scandir()

  • What's the difference between .php and .inc.php?

  • @ribly102 no difference.

  • @upiz Just wondering if there's any difference between them.

  • @ribly102 difference is only in file name, you can call it as u want, between.php, between.inc.php, between.whatever.php

  • Thanks for the unset(); that would have help along time ago!

    good tutorials as always though, may restructure the site now :)

  • Comment removed

  • @navgamingtk I agree, using file_exists() and basename() would probably be a better solution.

    eg:

    $file = $pages_dir . '/' . basename($p) . '.inc.php';

    if (file_exists($file))

    ...

    basename will strip any path from the name and just return the filename.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more