jonfreak Posted November 23, 2006 Share Posted November 23, 2006 HelloI am new to PHP. In fact a friend is helping me rebuild my website using php.Anyway, the site will have an index.php with all the include codes (I'll paste code at the bottom of this).I will use a mod rewrite to make the pages the same or similar as the previous html site.My main problem is that I have a blog using Blogger. I would like to keep this, in the same folder, as currently, as it is well linked etc. So my question is, is it possible to exclude a folder/section from the php code? i.e. can I continue to publish my blog to mysite/articles using Blogger? I have tried on my test pages and although the index.html for the blog is OK, the individual pages lose all the headers and footer as they are not read by the php.Any ideas?My current index.php:<?php // Jon's wonderful PHP index page. // This is the single entry-point for my website. // This function checks that the requested page is valid and exists. function isValidPage($section, $page) { return strlen($section) > 0 && strlen($page) > 0 && strchr($section . $page, "/") == FALSE && file_exists($section . "/" . $page); } $section=$_GET['section']; $page=$_GET['page']; if(isValidPage($section, $page)) { include($section . '/section_head.inc'); include($section . '/header.inc'); include($section . '/menu.inc'); include($section . '/link_unit.inc'); include($section . "/" . $page); include($section . '/right_content.inc'); include($section . '/footer.inc'); } else { // Requested page is not valid, so show the default page instead. include('head.inc'); include('header.inc'); include('menu.inc'); include('link_unit.inc'); include('defaultPage.inc'); include('right_content.inc'); include('footer.inc'); } include('footer_main.inc');?>Ideally I would like to place some sort of exclude /articles from this page or something..... Alternatively, if this is not possible (I have been told by coders that anything is possible...) then maybe if someone can suggest a blog that easily incorporates into the site, then I'll spend a long weekend writing out Permanent Redirects - not my idea of fun though!)Cheers,Jon. Link to comment https://forums.phpfreaks.com/topic/28245-using-a-blogger-blog-on-a-php-site/ Share on other sites More sharing options...
ataria Posted November 23, 2006 Share Posted November 23, 2006 I wouldn't even attempt to try to find the error...I would just create my own blog.Try creating one! You'll get tons of PHP experience from it. Link to comment https://forums.phpfreaks.com/topic/28245-using-a-blogger-blog-on-a-php-site/#findComment-129158 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.