This commit is contained in:
Wojciech Wylazowski 2022-09-28 14:20:11 +02:00
parent 8e99b02e39
commit 59680e6183
9 changed files with 211 additions and 14 deletions

43
Zadanie 1/variables.php Normal file
View file

@ -0,0 +1,43 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Variables</title>
</head>
<body>
<?php
$a = "kdqopdkosapdkow";
$b = 21;
$c = 21.37;
$d = TRUE;
echo $a . '<br>';
var_dump($a);
?><br>
<?php
echo $b . '<br>';
var_dump($b);
?><br>
<?php
echo $c . '<br>';
var_dump($c);
?><br>
<?php
echo $d . '<br>';
var_dump($d);
?><br>
<?PHP
define('A', 0.2);
echo A . '<br>';
var_dump(A);
?><br>
<?PHP
define('B', 69.42);
echo B . '<br>';
var_dump(B);
?>
<br><br><br>
</body>
</html>

22
Zadanie 2.2/index.php Normal file
View file

@ -0,0 +1,22 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>D</title>
</head>
<body>
<?PHP
$a = 97;
$b = 3.14;
$c = 'PHP';
?>
<h3 style="color: red"><?=$a?> jest liczbą pierwszą</h3>
<p style="color:rgb(255,99,71)">Liczba Pi zaokrąglona do dwóch miejsc po przecinku: <?=$b?></p>
<div style="color: green;text-decoration-line: underline;text-decoration-style:double;">
<?= $c?> to język skryptowy wykonywany po stronie serwera
</div>
</body>
</html>

41
Zadanie 2/syntax.php Normal file
View file

@ -0,0 +1,41 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>a</title>
</head>
<body>
<?PHP
echo"Tu "."funkcja "."echo";
?><br>
<?PHP
echo"Tu ","funkcja ","echo";
?><br>
<?PHP
$tfe = "Tu funkcja echo";
echo $tfe;
?><br>
<?PHP
echo($tfe);
?><br>
<?PHP
print "Zgłasza się funkcja print";
?><br>
<?PHP
print "Zgłasza "."się "."funkcja "."print";
?><br>
<?= "Pan Jezus"?><br>
<?= "Pan Papież"?><br>
<?PHP
//Pan papież lubił Pan Jezus
#Pan Jezus lubił Pan papież
/*
echo "bardzo lubie kremówki";
*/
?>
</body>
</html>

27
Zadanie 3/index.php Normal file
View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?PHP
define('DOBRA_RADA',"Bez chleba, to się nie najesz.");
echo DOBRA_RADA."<br>";
echo strlen(DOBRA_RADA)."<br>";
echo str_word_count(DOBRA_RADA)."<br>";
echo strrev(DOBRA_RADA)."<br>";
echo strpos(DOBRA_RADA, "to")."<br>";
echo str_replace("chleba","mięsa",DOBRA_RADA)."<br>";
echo strtolower(DOBRA_RADA)."<br>";
echo strtoupper(DOBRA_RADA)."<br>";
echo ucwords(DOBRA_RADA)."<br>";
echo trim(DOBRA_RADA)."<br>";
echo strstr(DOBRA_RADA, "nie")."<br>";
echo substr(DOBRA_RADA,10,5)."<br>";
echo str_pad(DOBRA_RADA,"37","-_-",STR_PAD_BOTH)."<br>";
?>
</body>
</html>

View file

@ -0,0 +1,30 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<br>
<?PHP
$title = "Strona Główna" ;
echo $title
?>
<ol style="list-style: decimal-leading-zero">
<li>
<a href="../index1.php">Strona ale inna</a>
</li>
<li>
<a href="../index2.php">Strona ale jeszcze inna</a>
</li>
<li>
<a href="../index3.php">Strona ale jeszcze bardziej inna</a>
</li>
</ol>
</body>
</html>

View file

@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<?= "Strona numer 1"
?>
<br>
<a href="Zadanie odnosniki/index.php">Powrót</a>
</body>
</html>

View file

@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<?= "Strona numer 2"
?>
<br>
<a href="Zadanie odnosniki/index.php">Powrót</a>
</body>
</html>

View file

@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<?= "Strona numer 3"
?>
<br>
<a href="Zadanie odnosniki/index.php">Powrót</a>
</body>
</html>

View file

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
echo "louda";
?>
</body>
</html>