Comments (5)
The upcoming development branch will support sub-domain installs. However, on development you can create a vhost on your computer so you don't have to install it at http://localhost/micromvc
.
The DOMAIN
constant is ONLY the domain TLD and does not include any path information. In the configuration file is a $config['site_url'] = '/';
value. That value can be changed to $config['site_url'] = '/your/path/here/';
if you need to install the system into site.tld/your/path/here/
. Then you could modify the site_url() function as follows:
function site_url($uri = NULL)
{
return (strpos($uri,'://')===FALSE?DOMAIN.config('site_url'):'').$uri;
}
from micromvc.
well workout little bit on framework and modify little code in index.php and bootstrap now framework work with module and just single controller and second parameter of url can call method of controller rest parameter can be passed or get through url. no need to create different controller for each call of module
http://localhost/micromvc/example/upload
class Example_controller extands{
action_upload(){
}
}
really need to work on routing also
from micromvc.
Combining multiple actions into a single controller just wastes resources. It is a bad style of design originally used by CodeIgniter and some of the first OO frameworks.
Each page request should be it's own controller. Trying to cram all the user actions or all the forum actions into a single file is bad design.
from micromvc.
man if you are working on a curd application where you have add, edit, delete, active and deactivate action means for just user you have to create 5 files if you are using OOP then take advantage of OOP not files. developers will become mad to handle so many files. few files will keep the name of framework as micro
from micromvc.
Professional applications rarely have simple CRUD actions. You may be able to write a small method starting your project, but eventually you have a file a couple thousand lines long just for CRUD actions.
It may be a bother to create 5 separate files, but it helps keep things clean and saves PHP from loading (and parsing) extra un-needed code.
from micromvc.
Related Issues (20)
- PHPUnit
- Bug in ORM.php HOT 1
- How to: Form Validation HOT 2
- Installing micro/micro error! HOT 2
- too many installation problems HOT 1
- About Locale.php
- Tag releases request
- Cannot load css file HOT 2
- Error ID: Issue
- Where not equal HOT 2
- Getting Page not Found HOT 1
- Deprecated iconv_set_encoding in PHP 5.6 HOT 2
- About localization
- PHP 5.3 -> PHP 5.5
- How to write another default method in Controller and access via Route HOT 3
- How to write hook
- has development stopped on micromvc? HOT 1
- multiple database connections?
- PHP7 + MicroMVC
- The domain `micromvc.com` is already lost? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micromvc.