Sha256: 3bd5db95b830d03dc815475caaaf715b54fc212205abf585d00fdec72f0f00ec
Contents?: true
Size: 584 Bytes
Versions: 14
Compression:
Stored size: 584 Bytes
Contents
<?php /** * WordPress routing for PHP buit in web server **/ $root = $_SERVER['DOCUMENT_ROOT']; chdir( $root ); $path = '/'. ltrim( parse_url( $_SERVER['REQUEST_URI'] )['path'], '/' ); set_include_path( get_include_path() .':'. __DIR__ ); if( file_exists( $root.$path ) ) { if( is_dir( $root.$path ) && substr( $path, strlen( $path ) - 1, 1 ) !== '/' ) { $path = rtrim( $path, '/' ) .'/index.php'; } if( strpos( $path, '.php' ) === false ) { return false; } else { chdir( dirname( $root.$path ) ); require_once $root.$path; } } else { include_once 'index.php'; }
Version data entries
14 entries across 14 versions & 1 rubygems