Voll Upload SGD Fachinformatiker PHP
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Bildinformationen auslesen</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Bildinformationen auslesen</h1>
|
||||
<img src="img/b1.jpg" width="300" alt="Hund"/>
|
||||
<hr/>
|
||||
|
||||
<?php
|
||||
$image = "img/b1.jpg";
|
||||
$exif = exif_read_data($image, 0, true);
|
||||
|
||||
foreach($exif as $key => $section){
|
||||
foreach($section as $name => $val){
|
||||
echo "$key.$name: $val <br/>";
|
||||
}
|
||||
echo "<hr/>";
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
@@ -0,0 +1,2 @@
|
||||
Maria Mustermann#mm@mm.de#Ich war hier!
|
||||
Frank Fischer#franky@fischer.com#Tolle Seite, weiter so :)
|
||||
|
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
function ausgabeGaestebuch() {
|
||||
$fp = @fopen('gaestebuch.csv', 'r');
|
||||
if ($fp == false) {
|
||||
|
||||
$fp = fopen('gaestebuch.csv', 'w');
|
||||
fclose($fp);
|
||||
} else {
|
||||
|
||||
$counter = 0;
|
||||
while ($zeile = fgetcsv($fp, 500, '#')) {
|
||||
echo ++$counter . ".<br>";
|
||||
echo "NAME: " . $zeile[0];
|
||||
echo "<br>E-MAIL: " . $zeile[1];
|
||||
echo "<br>KOMMENTAR:<br>" . $zeile[2] . "<hr>";
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
function eintragenGaestebuch() {
|
||||
if (isset($_GET['name']) AND isset($_GET['email']) AND isset($_GET['kommentar'])) {
|
||||
if (($_GET['name'] != "") AND ($_GET['email'] != "") AND ($_GET['kommentar'] != "")) {
|
||||
$str = $_GET['name'] . "#" . $_GET['email'] . "#" . $_GET['kommentar'] . "\n";
|
||||
$fp = fopen("gaestebuch.csv", 'a');
|
||||
fwrite($fp, $str);
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Gästebuch</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Gästebuch</h1>
|
||||
<h2>Bisherige Einträge</h2>
|
||||
<?php
|
||||
require ("gaestebuch.inc.php");
|
||||
eintragenGaestebuch();
|
||||
ausgabeGaestebuch();
|
||||
?>
|
||||
<h2>Ihr Beitrag zu unserem Gästebuch</h2>
|
||||
<form action="gaestebuch.php">
|
||||
Name:
|
||||
<input name="name">
|
||||
<br>
|
||||
E-Mail:
|
||||
<input name="email">
|
||||
<br>
|
||||
Kommentar
|
||||
<br>
|
||||
<textarea name="kommentar" cols="50" rows="5"></textarea>
|
||||
<br>
|
||||
<input type="submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user