Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
f16f90c8
Commit
f16f90c8
authored
Jul 30, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added script and style path constants. tweaked router usage in index.php.
parent
bc5299ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
index.php
public/index.php
+8
-2
No files found.
public/index.php
View file @
f16f90c8
...
@@ -23,6 +23,11 @@ define('SYS_PATH', realpath($system = '../system').'/');
...
@@ -23,6 +23,11 @@ define('SYS_PATH', realpath($system = '../system').'/');
// --------------------------------------------------------------
// --------------------------------------------------------------
define
(
'BASE_PATH'
,
realpath
(
str_replace
(
'system'
,
''
,
$system
))
.
'/'
);
define
(
'BASE_PATH'
,
realpath
(
str_replace
(
'system'
,
''
,
$system
))
.
'/'
);
// --------------------------------------------------------------
// The path to the public directory.
// --------------------------------------------------------------
define
(
'PUBLIC_PATH'
,
realpath
(
__DIR__
)
.
'/'
);
// --------------------------------------------------------------
// --------------------------------------------------------------
// Define various other framework paths.
// Define various other framework paths.
// --------------------------------------------------------------
// --------------------------------------------------------------
...
@@ -34,10 +39,11 @@ $constants = array(
...
@@ -34,10 +39,11 @@ $constants = array(
'LIBRARY_PATH'
=>
APP_PATH
.
'libraries/'
,
'LIBRARY_PATH'
=>
APP_PATH
.
'libraries/'
,
'MODEL_PATH'
=>
APP_PATH
.
'models/'
,
'MODEL_PATH'
=>
APP_PATH
.
'models/'
,
'PACKAGE_PATH'
=>
APP_PATH
.
'packages/'
,
'PACKAGE_PATH'
=>
APP_PATH
.
'packages/'
,
'PUBLIC_PATH'
=>
realpath
(
__DIR__
)
.
'/'
,
'ROUTE_PATH'
=>
APP_PATH
.
'routes/'
,
'ROUTE_PATH'
=>
APP_PATH
.
'routes/'
,
'SCRIPT_PATH'
=>
PUBLIC_PATH
.
'js/'
,
'SESSION_PATH'
=>
APP_PATH
.
'storage/sessions/'
,
'SESSION_PATH'
=>
APP_PATH
.
'storage/sessions/'
,
'STORAGE_PATH'
=>
APP_PATH
.
'storage/'
,
'STORAGE_PATH'
=>
APP_PATH
.
'storage/'
,
'STYLE_PATH'
=>
PUBLIC_PATH
.
'css/'
,
'SYS_VIEW_PATH'
=>
SYS_PATH
.
'views/'
,
'SYS_VIEW_PATH'
=>
SYS_PATH
.
'views/'
,
'VIEW_PATH'
=>
APP_PATH
.
'views/'
,
'VIEW_PATH'
=>
APP_PATH
.
'views/'
,
);
);
...
@@ -140,7 +146,7 @@ $response = System\Route\Filter::call('before', array(), true);
...
@@ -140,7 +146,7 @@ $response = System\Route\Filter::call('before', array(), true);
// ----------------------------------------------------------
// ----------------------------------------------------------
if
(
is_null
(
$response
))
if
(
is_null
(
$response
))
{
{
$route
=
System\Router
::
route
(
System\Request
::
method
(),
System\Request
::
uri
()
);
$route
=
System\Router
::
make
(
System\Request
::
method
(),
System\Request
::
uri
())
->
route
(
);
$response
=
(
is_null
(
$route
))
?
System\Response
::
make
(
System\View
::
make
(
'error/404'
),
404
)
:
$route
->
call
();
$response
=
(
is_null
(
$route
))
?
System\Response
::
make
(
System\View
::
make
(
'error/404'
),
404
)
:
$route
->
call
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment