slim-3


Fatal error: Class 'Slim\app' not found in locally it works but Error on Hosting


I tried to upload it on hosting, but I get message Fatal Error, I tried locally just fine it works, is there any setup?
<?php
require '../vendor/autoload.php';
require '../libs/NotORM.php';
//config
//$app = \Slim\Slim::getInstance();
//use \Slim\App;
//$app = new \Slim\Slim();
$app = new \Slim\app;
$dbhost = 'localhost';
$dbuser = 'secret';
$dbpass = 'blablabla';
$dbname = 'unit';
$dbmethod = 'mysql:dbname=';
$dsn = $dbmethod.$dbname;
$pdo = new PDO($dsn, $dbuser, $dbpass);
$db = new NotORM($pdo);
//define app home
$app-> get('/', function(){
echo "Yoho ^_^";
});
//run App
$app->run();
And here my composer
{
"require": {
"slim/slim": "^3.0"
}
}

Related Links

Fatal error: Class 'Slim\app' not found in locally it works but Error on Hosting
Get the previous route name or uri in Slim 3

Categories

HOME
python
xbox-live
ajax
batch-processing
sed
ipython
survival-analysis
matplotlib
zend-framework2
recyclerview
phaser-framework
defragmentation
rebol
iis-7.5
jpanel
i2c
actionscript-2
octopus-deploy
eclipse-cdt
wicket
camera-calibration
finite-group-theory
simple-injector
future
sign
uicollectionview
session-timeout
off-canvas-menu
deb
kitematic
myob
system.data.sqlite
gzip
cell-array
hibernate-cache
jackson-dataformat-csv
exponential
mapguide
tripwire
spring-bean
facebook-chatbot
tableau-server
azure-availability-set
gist
slot
ticker
visual-studio-templates
pdfkit
createobject
icefaces
json-schema-validator
ng2-material
dac
usb-drive
acm
difference
achartengine
type-mismatch
ubercart
gray-code
swift2.1
hg-git
jython-2.7
orientation-changes
vcl
formvalidation-plugin
surrogate-key
cppdepend
magic-numbers
late-static-binding
jstack
factors
unison
roxygen
visual-studio-addins
document-database
cdata
sttwitter
lame
shortcuts
qt4.6
pys60
usn
static-variables
gdt
executable-format
adsl
nagle
integer-promotion
handheld
visual-studio-dbpro
document-library

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App