Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <?php
  2. echo "seconds passed since 01-01-1970 00:00 GMT is ".time();
  3. ?>
  4.  
  5. <?php
  6. $test=require("test.php");
  7. echo "the content of test.php is:<hr>".$test;
  8. ?>
  9.  
  10. <?php
  11. function requireToVar($file){
  12. ob_start();
  13. require($file);
  14. return ob_get_clean();
  15. }
  16. $test=requireToVar($test);
  17. ?>
  18.  
  19. <?php
  20. return 'abc';
  21.  
  22. $abc = include 'include.php';
  23.  
  24. ob_start();
  25. include 'include.php';
  26. $buffer = ob_get_clean();
  27.  
  28. <?php
  29. return 'seconds etc.';
  30.  
  31. <?php
  32. $text = include('file.php'); // just assigns value returned in file
  33.  
  34. return (function () {
  35. // Local variables (not exported)
  36. $current_time = time();
  37. $reference_time = '01-01-1970 00:00';
  38.  
  39. return "seconds passed since $reference_time GMT is $current_time";
  40. })();
  41.  
  42. return call_user_func(function(){
  43. // Local variables (not exported)
  44. $current_time = time();
  45. $reference_time = '01-01-1970 00:00';
  46.  
  47. return "seconds passed since $reference_time GMT is $current_time";
  48. });
  49.  
  50. $banner = require 'test.php';
  51.  
  52. $var = require '/dir/file.php';
  53.  
  54. <?php
  55.  
  56. function get_file($path){
  57.  
  58. return eval(trim(str_replace(array('<?php', '?>'), '', file_get_contents($path))));
  59. }
  60.  
  61. $var = get_file('/dir/file.php');
  62.  
  63. <?php
  64. //include.php file
  65. $return .= "value1 ";
  66. $return .= time();
  67.  
  68. <?php
  69. // other.php file
  70. function() {
  71. $return = "Values are: ";
  72. include "path_to_file/include.php";
  73.  
  74. return $return;
  75. }
  76.  
  77. Values are: value1, 145635165
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement