-
-
Save jackmakiyama/45830e2d46a5daa47aa8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Sample: http://localhost/controller.php?name=Fulano | |
include 'model.php'; | |
$hw = new HelloWorld; | |
$name = $_GET['name']; | |
$greetings = $hw->say($name); | |
include 'view.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class HelloWorld { | |
public function say($name) { | |
return 'Hello '.$name; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<title>Hello World</title> | |
<p> | |
<?php echo $greetings;?>, this is your first MVC. | |
</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment