Physical Path Setting Problem
Posted: Tue Jul 08, 2008 1:31 pm
Hi
I am uploading my site and i am unable to set physical path of my site because i don't know the exact location from which it is viewing to user
Kindly tell me the physical path or some generic help through which i can solve this problem
---------------------------------------------------------Site End Config----------------------------------------------------------------------
Folder Positions
Software/resource_images/
Software is the main folder in which all folder resides one of them is resource_images, from which i want to show the pics of softwares
The Path I am Setting to check that the file exist or not
$Root_Path=sms
$path=$ROOT_PATH."\\resources_images\\".$id;
----------------------------------------------------------------------------------------------------------
--------------------------------------------------------Computer Setting With Code--------------------------------------------------
MY Computer Setting
Physical Path $ROOT_PATH="e:\\xampp\\htdocs\\sms";
$path=$ROOT_PATH."\\resources_images\\".$id;
if(file_exists($path.".jpg"))
{
echo "<a href='index.php?rid=$row[r_id]&value=phpfiles/downloadSoftware'>";
echo "<img src='$URL_PATH"."/resources_images/".$id.".jpg' width='100' height='100' border='0' alt='$row[name]'></a>";
}
else if(file_exists($path.".jpeg"))
{
echo "<a href='index.php?rid=$row[r_id]&value=phpfiles/downloadSoftware'>";
echo "<img src='$URL_PATH"."/resources_images/".$id.".jpeg' width='100' height='100' border='0' alt='$row[name]'></a>";
}
else if(file_exists($path.".gif"))
{
echo "<a href='index.php?rid=$row[r_id]&value=phpfiles/downloadSoftware'>";
echo "<img src='$URL_PATH"."/resources_images/".$id.".gif' width='100' height='100' border='0' alt='$row[name]'></a>";
}
else if(file_exists($path.".png"))
{
echo "<a href='index.php?rid=$row[r_id]&value=phpfiles/downloadSoftware'>";
echo "<img src='$URL_PATH"."/resources_images/".$id.".png' width='100' height='100' border='0' alt='$row[name]'></a>";
}
else
{
echo "<a href='index.php?rid=$row[r_id]&value=phpfiles/downloadSoftware'>";
echo "<img src='$URL_PATH"."/resources_images/0.jpg' width='100' height='100' border='1' alt='$row[name]'></a>";
}
?>
--------------------------------------------------------------------------------------------------------------------------------
Thanks
I am uploading my site and i am unable to set physical path of my site because i don't know the exact location from which it is viewing to user
Kindly tell me the physical path or some generic help through which i can solve this problem
---------------------------------------------------------Site End Config----------------------------------------------------------------------
Folder Positions
Software/resource_images/
Software is the main folder in which all folder resides one of them is resource_images, from which i want to show the pics of softwares
The Path I am Setting to check that the file exist or not
$Root_Path=sms
$path=$ROOT_PATH."\\resources_images\\".$id;
----------------------------------------------------------------------------------------------------------
--------------------------------------------------------Computer Setting With Code--------------------------------------------------
MY Computer Setting
Physical Path $ROOT_PATH="e:\\xampp\\htdocs\\sms";
$path=$ROOT_PATH."\\resources_images\\".$id;
if(file_exists($path.".jpg"))
{
echo "<a href='index.php?rid=$row[r_id]&value=phpfiles/downloadSoftware'>";
echo "<img src='$URL_PATH"."/resources_images/".$id.".jpg' width='100' height='100' border='0' alt='$row[name]'></a>";
}
else if(file_exists($path.".jpeg"))
{
echo "<a href='index.php?rid=$row[r_id]&value=phpfiles/downloadSoftware'>";
echo "<img src='$URL_PATH"."/resources_images/".$id.".jpeg' width='100' height='100' border='0' alt='$row[name]'></a>";
}
else if(file_exists($path.".gif"))
{
echo "<a href='index.php?rid=$row[r_id]&value=phpfiles/downloadSoftware'>";
echo "<img src='$URL_PATH"."/resources_images/".$id.".gif' width='100' height='100' border='0' alt='$row[name]'></a>";
}
else if(file_exists($path.".png"))
{
echo "<a href='index.php?rid=$row[r_id]&value=phpfiles/downloadSoftware'>";
echo "<img src='$URL_PATH"."/resources_images/".$id.".png' width='100' height='100' border='0' alt='$row[name]'></a>";
}
else
{
echo "<a href='index.php?rid=$row[r_id]&value=phpfiles/downloadSoftware'>";
echo "<img src='$URL_PATH"."/resources_images/0.jpg' width='100' height='100' border='1' alt='$row[name]'></a>";
}
?>
--------------------------------------------------------------------------------------------------------------------------------
Thanks