Title: PHP Code Widget
Last modified: August 19, 2016

---

# PHP Code Widget

 *  [wesmcdermott](https://wordpress.org/support/users/wesmcdermott/)
 * (@wesmcdermott)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/php-code-widget-2/)
 * 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](http://www.mysweatyhandsandfeet.com)
 * Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/php-code-widget-2/#post-1631891)
 * And what’s the code?
 *  Thread Starter [wesmcdermott](https://wordpress.org/support/users/wesmcdermott/)
 * (@wesmcdermott)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/php-code-widget-2/#post-1631899)
 * The code added to the widget is:
 * `<?php include_once('buy_products.php');?>`
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/php-code-widget-2/#post-1631931)
 * 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.
 *  Thread Starter [wesmcdermott](https://wordpress.org/support/users/wesmcdermott/)
 * (@wesmcdermott)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/php-code-widget-2/#post-1631948)
 * 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
       ```
   
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/php-code-widget-2/#post-1631963)
 * Sounds like there’s some suspicious code in that included file.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘PHP Code Widget’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [php code](https://wordpress.org/support/topic-tag/php-code/)

 * 5 replies
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/php-code-widget-2/#post-1631963)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
