Ben gibi dosya yolunu tanımlanmış
$docRoot = $_SERVER['DOCUMENT_ROOT'];
$webRoot = str_replace(array($docRoot, 'library/config.php'), '', $thisFile);
define('WEB_ROOT', $webRoot);
ve benim tekabül sayfalarında kullanılır gibi-
<a href="<?php echo WEB_ROOT; ?>admin/" class="leftnav">Home</a>
<a href="<?php echo WEB_ROOT; ?>admin/category/" class="leftnav">Category</a>
<a href="<?php echo WEB_ROOT; ?>admin/product/" class="leftnav">Product</a>
but when I run this program on localhost I works fine but on server when I click on these hyper-links this gives following error-
Firefox doesn't know how to open this address, because the protocol (d) isn't associated with any program.
and if I view page source the href path of these link are -
<a href="D:/Hosting/6448289/html/products/admin/category/" class="leftnav">Category</a>
<a href="D:/Hosting/6448289/html/products/admin/product/" class="leftnav">Product</a>