Can someone tell me why I should use this kind of path (with the double backslashes) here. It works, but I need an explanation to add in my final work to finish my studies...
$caminho="C:\WebPub\www.upt.pt\www\htdocs\imagens\fotos\";
$caminhourl ="../imagens/fotos/";
$file=$caminho.$linhadocente["id_doc"];
switch(true)
{
case file_exists($file.".jpg"):
$foto=$file.'.jpg';
break;
case file_exists($file.".gif"):
$foto=$file.'.gif';
break;
case file_exists($file.".bmp"):
$foto=$file.'.bmp';
break;
default:
$foto=$caminhourl.'silhueta.gif';
break;
}
echo '<img src="'.$foto.'" border=1 width="100" height="150">'; ?>