Page 263 - Computer Software Application TP - Volume 1
P. 263
COMPUTER SOFTWARE APPLICATION - CITS
echo $_SERVER[‘HTTP_HOST’];
echo “<br>”;
echo $_SERVER[‘HTTP_REFERER’];
echo “<br>”;
echo $_SERVER[‘HTTP_USER_AGENT’];
echo “<br>”;
echo $_SERVER[‘SCRIPT_NAME’];
echo “<br>”;
echo $_SERVER[‘REQUEST_METHOD’];
echo “<br>”;
echo $_SERVER[‘QUERY_STRING’];
echo “<br>”;
echo $_SERVER[‘REMOTE_ADDR’];
?>
• Save the program in C:\Apache24\htdocs in a folder with .php extension
• Run the Apache services from windows services
• Open the browser and type the following address
http://localhost/foldername/
6 Click the php file to run and verify the output
TASK 5: File upload
1 Create an HTML form that allows users to select and upload files.
• Open the text editor
• Write the following codes
<html>
<head>
<meta charset=”UTF-8”>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0”>
<title>File Upload</title>
</head>
248
CITS : IT & ITES - Computer Software Application - Exercise 53