5 replies
I am using a woo theme but I thought I would ask here first since I might get a quicker response, here is my problem which is strange. I am getting this error message

"Warning: include(layouts) [function.include]: failed to open stream: No such file or directory in /public_html/wp-content/themes/freshnews/home.php on line 13

Warning: include(layouts) [function.include]: failed to open stream: No such file or directory in /public_html/wp-content/themes/freshnews/home.php on line 13

Warning: include() [function.include]: Failed opening 'layouts' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /public_html/wp-content/themes/freshnews/home.php on line 13"

All files match and are named correctly, so I am guessing this isn't the problem, is there anything wrong with the code? Line 13 is arrowed to.

PHP Code:
<?php get_header(); ?>

        <div id="centercol" class="grid_10">
        
        <?php if (get_option('woo_show_blog') == false) { ?>

        <?php include(TEMPLATEPATH '/includes/featured.php'); ?>

        <?php
            
             
get_option('woo_layout');

            include(
'layouts/'.); <--------------------line 13
            
        ?>
        
        <?php } else { include(TEMPLATEPATH '/includes/stdblog.php'); } ?>

        </div><!--/centercol-->

<?php get_sidebar(); ?>

<?php get_footer(); ?>
I appreciate the help
#error #php
  • Profile picture of the author willmartinapj
    are you using full path or relative
    {{ DiscussionBoard.errors[1902161].message }}
  • Profile picture of the author imarketstuff
    hola

    you are trying to include a "directory" with that statement, and php is saying it can't find it. 99% of the time, you use the include directive to include a "file", for example

    Code:
    include('layouts/filename.extension');
    or

    Code:
    include('./layouts/filename.extension');
    Signature
    I MARKET STUFF

    {{ DiscussionBoard.errors[1902179].message }}
  • Profile picture of the author imarketstuff
    you can also see that there is a "." after the literal string which implies something was going to be concatenated with the string, like:

    Code:
    include('layouts/'. filename variable);
    you are missing something

    peace
    Signature
    I MARKET STUFF

    {{ DiscussionBoard.errors[1902189].message }}
    • Profile picture of the author shousley
      Originally Posted by imarketstuff View Post

      you can also see that there is a "." after the literal string which implies something was going to be concatenated with the string, like:

      Code:
      include('layouts/'. filename variable);
      you are missing something

      peace
      imarketstuff is right. There is a "." operator. If only the directory "layout" you want to include just remove the dot "." operator. Or add a filename after the dot operator.
      {{ DiscussionBoard.errors[1904023].message }}
  • Profile picture of the author KirkMcD
    Where is "TEMPLATEPATH" defined? That is your problem.
    Part of the path is missing.
    {{ DiscussionBoard.errors[1904965].message }}

Trending Topics