Answers for "path to image"

7

path in html

/   = Root directory
   .   = This location
   ..  = Up a directory
   ./  = Current directory
   ../ = Parent of current directory
   ../../ = Two directories backwards
Posted by: Guest on March-26-2020
0

image path

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>This is a test</title>
<script language="javascript" type="text/javascript">
function getPath() {
var Form = document.forms['frm_upload'];
var inputName = Form.elements['file1'].value;

var imgPath = inputName;
Form.elements['file_src'].value = imgPath;
}
</script>
</head>

<body>
<form name="frm_upload" method="post" enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" onSubmit="getPath();">
<input name="file1" type="file"><br>
<input name="file_src" type="hidden" value="">
<input name="btn_submit" type="submit" value="show path">
</form>
<?php
	echo stripslashes($_POST["file_src"]);
?>
</body>
</html>
Posted by: Guest on June-30-2021
0

html relative path

<!--The ./ means the contact.html file is in the same file 
as the file that is linked to it-->
<a href="./contact.html">Contact</a>
Posted by: Guest on August-18-2020

Browse Popular Code Answers by Language