国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁(yè)技術(shù)文章
文章詳情頁(yè)

請(qǐng)問(wèn)要觸發(fā)這個(gè)file_get_content 給一下解題思路也好....

瀏覽:104日期:2022-06-03 08:05:41

問(wèn)題描述

<?php

highlight_file(__FILE__);

error_reporting(0);

class Game{

public $username;

public $password;

public $choice;

public $register;

public $file;

public $filename;

public $content;

public function __construct()

{

$this->username='user';

$this->password='user';

}

public function __wakeup(){

if(($this->register)==="admin"){

$this->choice=new login($this->file,$this->filename,$this->content);

}else{

$this->choice = new register();

}

}

public function __destruct() {

$this->choice->checking($this->username,$this->password);

}

}

class login{

public $file;

public $filename;

public $content;

public function __construct($file,$filename,$content)

{

$this->file=$file;

$this->filename=$filename;

$this->content=$content;

}

public function checking($username,$password)

{

if($username==='admin'&&$password==='admin'){

$this->file->open($this->filename,$this->content);

die('login success you can to open shell file!');

}

}

}

class register{

public function checking($username,$password)

{

if($username==='admin'&&$password==='admin'){

die('success register admin');

}else{

die('please register admin ');

}

}

}

class Open{

function open($filename, $content){

echo file_get_contents($filename);

}

}

@unserialize(base64_decode($_POST['unser']));

}

這是老師發(fā)的一個(gè)題目,因?yàn)镻HP學(xué)習(xí)還沒有那么深入,所以希望能有一個(gè)解題思路

問(wèn)題解答

回答1:

問(wèn)題不夠詳情。

file_get_contents() 函數(shù)把整個(gè)文件讀入一個(gè)字符串中。

這個(gè)可以抓取數(shù)據(jù),不過(guò)現(xiàn)在curl的功能更好。

相關(guān)文章:
主站蜘蛛池模板: 乐东| 遵义县| 连州市| 五常市| 体育| 新野县| 河北区| 商南县| 富平县| 北碚区| 揭东县| 宣武区| 金塔县| 永丰县| 九台市| 宣武区| 阿城市| 陇川县| 秦皇岛市| 清原| 新民市| 霍林郭勒市| 娱乐| 镇宁| 涞水县| 区。| 健康| 镇康县| 微山县| 砀山县| 金坛市| 西安市| 南宁市| 比如县| 江城| 深州市| 封丘县| 梓潼县| 五常市| 霞浦县| 铜鼓县|