PHP Code Widget
[resolved] getting SQL error. See 'logs/mysql.log' when using include (2 posts)

  1. charles_i
    Posted 2 years ago #

    I'm trying to add an include to a mini-calendar in my sidebar. My theme is called "scoop" and this is the correct path to the php file that runs the mini-calendar but when I enter this:

    include (ABSPATH . '/wp-content/themes/scoop/calendar/lcsbar.php');

    I get this result:

    SQL error. See 'logs/mysql.log'

    However if I enter the URL to the entire path with my domain name where ABSPATH is I can see the mini-calendar is there.

    How can I get the include to work?



  2. Samuel Wood (Otto)
    WordPress.org Tech Dude
    Plugin Author

    Posted 2 years ago #

    The include works fine. But your code in that file might be assuming that it is running in a global context instead of in a function context.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic