Watsun Posted October 25, 2012 Share Posted October 25, 2012 I know this is possible, but somehow the terms i am using to search for this must be completely off... I have a directory in, let's say /public_html/posts -- and this directory is filled with individual news posts, each having their own PHP file that contains what amounts to a DIV with some Facebook OG tags thrown in for good measure (that I am hoping takes precedence over what is declared in the <head> section of my header include, but am willing to shrug off). I want to be able to display all of these individual post pages in order by filename -- perhaps with the added ability to limit the initial amount of posts visible to a certain number, and a 'show more' button which then displays the remainder of the folder's contents. I built my first 'php-enabled' site about a month ago, and my knowledge at this point is primarily limited to includes and fiddling with code snippets with mixed results -- so, in essence, I know nothing. I realize that this is probably not the best way to go about giving my site 'canonical links' (in that my request doesn't do that, at all), the primary reasoning for this is for SEO-like ability and to give each news post it's own Facebook sharing options. If someone has any input on a better method or insight, i'd appreciate that just as much. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/269910-display-php-files-from-folder-not-a-directory-listing/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.