Comments (2)
Hi @Hendrik-Koelbel ,
Thank you for your report.
I now have seen the issue and pushed commit #5ee193f fixing it, try the last version and tell me.
Further illustration
-
The constructor in core/App.php was using a variable $language which is defined in the class, but i should have referenced to it using $this->language
so line 28 should be
define('LANGUAGE', $this->language);
and for further precaution I've edited the condition in line 25 to be
if($req != NULL && file_exists('../app/languages/' . $req[0])){
-
For the core/Controller.php the variable $lang is actually defined when you import the language file.
so lines 47 and 53 are correct.
However, these issues weren't causing an internal server error, only undefined variables, so i encourage you to check the server logs for any other issues.
from php-mvc-skeleton.
@Hendrik-Koelbel The parser wouldn't care how many slashes / in the url, the parameters will be parsed correctly.
you should check the logs for this internal server error.
your suggestion regarding language part is actually easier to implement, but you'll load a bulk of unneeded values in an array that you may never use.
anyway, if you want to you can do it easily by editing core/Controller.php and removing the conditions in line 45 and the condition in line 52, and replacing them with:
require_once("../app/languages/" . LANGUAGE . "/". LANGUAGE .".php");
/* $lang is an array that is defined in the language file. */
$data['lang']= $lang;
and all the language data will be stored in $data['lang'].
NOTE I've reversed the last commit regarding the $lang and edited the comment above, kindly check it.
from php-mvc-skeleton.
Related Issues (5)
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 php-mvc-skeleton.