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

您的位置:首頁技術文章
文章詳情頁

請問要觸發這個file_get_content 給一下解題思路也好....

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

問題描述

<?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']));

}

這是老師發的一個題目,因為PHP學習還沒有那么深入,所以希望能有一個解題思路

問題解答

回答1:

問題不夠詳情。

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

這個可以抓取數據,不過現在curl的功能更好。

相關文章:
主站蜘蛛池模板: 沁阳市| 长沙市| 大荔县| 福泉市| 饶阳县| 湖北省| 忻州市| 永新县| 寻乌县| 于田县| 西盟| 修水县| 山西省| 万宁市| 宣汉县| 青州市| 南江县| 包头市| 西盟| 叙永县| 苏尼特左旗| 雷州市| 定安县| 拉萨市| 宁晋县| 治县。| 黄平县| 淮北市| 资源县| 冀州市| 嵊州市| 岑溪市| 安庆市| 西乌珠穆沁旗| 东乌珠穆沁旗| 秦皇岛市| 黎城县| 沁阳市| 筠连县| 靖边县| 邹城市|