Jun 02
One of my projects was uploaded to a windows hosting and i found server of document root was not working. So i searched and i found the following gimmick of using it in windows hosting.
<?php if ( ! isset($_SERVER['DOCUMENT_ROOT'] ) ) $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr( $_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF']) ) ); ?> |
Recent Comments