Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0

Bug #20926 Dynamic loading
Submitted: 2015-07-26 23:09 UTC
From: mbiama Assigned:
Status: Open Package: File_Util (version SVN)
PHP Version: 5.6.11 OS: Linux, Windows, Mac
Roadmaps: (Not assigned)    
Subscription  


 [2015-07-26 23:09 UTC] mbiama (Roger Mbiama)
Description: ------------ Common Debugging protocol Cross-language: PHP, HHVM, Python, Perl... Test script: --------------- /** .... */ static public function register() { spl_autoload_register(array(self::instance(), 'autoload'))Â ; } /** * Load class source code * *@param string class */ public function autoload($class) { if ($this->_collectionClass) $this->_arrLoadedClass[self::$_scope][] = $class; } if ($this->_isincludePathDefined){ $classFile = COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR ..$class; } else {} Expected result: ---------------- <?php bin ang /** * It should be accesible like this: * http://.../source.php?path=/var/www/mysourcecode/file.php */ $allowed = array( '250 2.1.5' ); if (isset($_SERVER['REMOTE_ADDR']) && in_array($_SERVER['REMOTE_ADDR'], $allowed)) { $f = ''; if (isset($_GET['path'])) { $filename = $_GET['path']; if ($filename) { $f = file_get_contents($filename); } } header('Content-type: text/plain'); echo $f; } else { echo 'Permission denied!'; } -- Permanent link at bugs.php.net/bug.php?id=70136&edit=2

Comments

 [2015-07-26 23:10 UTC] mbiama (Roger Mbiama)