Php error...

by 5 replies
6
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
#programming #error #php
  • are you using full path or relative
  • 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');
  • 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:
     
    you are missing something

    peace
    • [1] reply
    • 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.
  • Where is "TEMPLATEPATH" defined? That is your problem.
    Part of the path is missing.
  • Banned
    [DELETED]

Next Topics on Trending Feed

  • 6

    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