Patreon |
Follow on Twitter @
In this PHP OOP/OOD Tutorial Ill teach you how you can create a very simple, lightweight MVC. This tutorial covers creating an MVC PHP application and the bare essentials. Create PHP MVC.
Get Code @
Nguồn:https://phprealestatescript.com/
Xem Thêm Bài Viết Khác:https://phprealestatescript.com/lap-trinh-php
When I do what you wrote at 3:00 I get the error Notice: Undefined index: url in C:reposMVCSource filesindex.php on line 3, what is wrong?
We appreciate you 🙂
Cannot declare class Error, because the name is already in use in
Vey nice tutorial!
this blown my mind.. can anyone explain the htaccess code for? I'm very confuse
Sir, some of your videos become classics to me ! Love from India 🙂
i love youuuuuu
lib*
Why nobody expllains why files are in that folderr. we have to try to guess by our own.
please can someone help me I have followed this mvc tutorials and it is working fine on php5 but it is given error (server not found ) in php7 please can one help me to fix the error
use spl_autoload_register() to avoid calling require() each time before loading class.
$_GET['url'] is not working for me…. ivefound an alternative $url = trim($_SERVER['REQUEST_URI'],'/');
In 2015 I met this tutorial and it changed my career, I learned the main concepts of MVC.
Now I am a Laravel developer. but still, I am using your concept. Because of less dependency, scalability and flexibility, this is perfect for small projects.
Thank you very much Sir, may God bless you!
Source code not available in the link share me the link
now 2018 It's late to learn this?
undefined index solutions
.htaccess code
Options -MultiViews
RewriteEngine On
Options -Indexes
RewriteBase /mvc –> project folder
Hi, I noticed an oddity if I just go to the root, i get a "url not set" (of course), but anything else in the url works as it should, how would it make it if someone goes to the root, it will send it to index?
So I have to check to see if url is set, then "get" it, if not, I have to hard set it.
Sounds like something in the conf file is not working just right. any idea?
Great tutorial!!! I am a PL trainer, your example helped me a lot to adjust the things quickly. Thank you!!!
it doesnt work on xampp
Hi thank you very much for the videos are really enjoyed them. I followed PHP MVC one and I'm currently in middle of the 2nd. However when I call the JavaScript files, it returns them but the content is whatever is displaying on the page. Basically they would be an error in the console when I click on the JavaScript page it will show text for example it would say this is there error view. When I put in the complete URL for the JavaScript file I just get the error page. In other words it is trying to render a neural and putting in and because it doesn't make sense to the render it's just returning the error class
Youre including files based on the URI thats absolutely against all rules of MVC!!! MVC was created to avoid those traps! Nobody wants unknown visitors to control what files are included!
Ty
Really liked…simply sooperb video…..Any way to get source code of this videos…..
I have a doubt about $controller->($url[1]}();
What it means? A little confused.
Hi there, How to pass the errors from the controller to the view?