-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path009.php
48 lines (36 loc) · 1.19 KB
/
009.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!doctype html>
<html lang="pt-br">
<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>009 - Require e Include de Arquivos</title>
</head>
<body style="font-size: 1.1em">
<div style="background-color: gray;"><h2>Include</h2></div>
<?php
echo "A $color $fruit"; // A
// não achou o arquivo include antes
include __DIR__ . "/009/header.php";
echo "A $color $fruit"; // A green apple
$profile = new StdClass();
$profile->name = "Leandro";
$profile->company = "Fratelli";
$profile->email = "contato@fratelliti.com.br";
include __DIR__ . "/009/profile.php";
$profile = new StdClass();
$profile->name = "Carol";
$profile->company = "Fratelli";
$profile->email = "contato@fratelliti.com.br";
include __DIR__ . "/009/profile.php";
?>
<div style="background-color: gray;"><h2>Require</h2></div>
<?php
require __DIR__ . "/009/config.php";
echo "Website: " . WEBSITE . PHP_EOL;
echo "Empresa: " . NAME . PHP_EOL;
echo "Instagram " . INSTAGRAM . PHP_EOL;
?>
</body>
</html>