Forums

PHP Code Widget (6 posts)

  1. wesmcdermott
    Member
    Posted 1 year ago #

    I have a piece of code that I've added using this PHP widget in the sidebar, but it's not showing for some reason?

    The script I have is to produce a certain widget from amazon depending on what location a person is from.

    The site I'm having trouble with is http://www.mysweatyhandsandfeet.com

    Thanks.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    And what's the code?

  3. wesmcdermott
    Member
    Posted 1 year ago #

    The code added to the widget is:

    <?php include_once('buy_products.php');?>

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    I'd suggest that you include the full path to the file from document root. WordPress doesn't work well with relative urls, so the same applies to included file paths.

  5. wesmcdermott
    Member
    Posted 1 year ago #

    I'm getting the following error now:

    Warning: include_once(mysweatyhandsandfeet.com/buy_products.php) [function.include-once]: failed to open stream: No such file or directory in /home/weigh8/public_html/mysweatyhandsandfeet/wp-content/plugins/php-code-widget/execphp.php(44) : eval()'d code on line 1
    
    Warning: include_once() [function.include]: Failed opening 'mysweatyhandsandfeet.com/buy_products.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/weigh8/public_html/mysweatyhandsandfeet/wp-content/plugins/php-code-widget/execphp.php(44) : eval()'d code on line 1
  6. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Sounds like there's some suspicious code in that included file.

Topic Closed

This topic has been closed to new replies.

About this Topic