Comments (12)
Is your host root pointed to the public directory inside dts?
from slim4-skeleton.
Good hint from @dunkoh. I thought you were using Apache. If you use the PHP internal web server, you can try this command:
cd c:\wamp\www\dts
php -S localhost:8080 -t public
Then navigate to: http://localhost:8080/
The base href should then look like this: <base href="/"/>
from slim4-skeleton.
I'm not sure what you have tried, but try this:
- Run:
npx webpack --mode=development
or justnpx webpack
to build the assets - Then check if the files exists in the
public/assets/
directory - If you run your site / app in a sub-directory, make sure you set the correct base href of the html document, e.g.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<base href="{{ base_path() }}/"/>
- Show me the F12 developer toolbar request and response.
from slim4-skeleton.
Just creating own simple cms to learn. Thank you so much for your skeleton which great start-up for new Slim learners.
I already did mentioned things. Console return 404 errors.
from slim4-skeleton.
Looks good, so far. Try to find the "correct" url for the main.js/main.css files manually.
from slim4-skeleton.
Actually same working on Hosting server but in the localhost. Any idea for it.?
from slim4-skeleton.
Sounds like an typical basePath issue if you run Slim in an sub-directory (applies for most development environments). Please give me more details (error message & code, screenshot, directory, etc...).
from slim4-skeleton.
Running directory is c/wamp/www/dts(simple cms). I used your skeleton nothing else. I added some screenshot here. please let me know if you need anything else. Thank you.
from slim4-skeleton.
Your app is running in a sub-directory (under c/wamp/www/dts). So the BasePathMiddleware should set Slims basePath to /dts
automatically for you.
What is the output of the Twig helper function base_path()
?
in your layout/layout.wig file here:
<base href="{{ base_path() }}/"/>
On your localhost the output should be: <base href="dts/"/>
On your prod server the output should be: <base href="/"/>
from slim4-skeleton.
What is the output of the Twig helper function
base_path()
?
@odan Return <base href="/"/>
- where do i change that?
from slim4-skeleton.
Is your host root pointed to the public directory inside dts?
@dunkoh i think yes. C:\wamp\www\dts>php -S localhost:8080 -t public public/index.php
from slim4-skeleton.
@odan Which is works cool!. Thank you.
from slim4-skeleton.
Related Issues (20)
- Install troubleshooting HOT 2
- Wrong statement in the configuration doc page HOT 4
- Database migrations with phinx and schema.sql generation HOT 5
- Which session package should I use? HOT 4
- Missing TemplateRenderer/HtmlRenderer HOT 2
- Question: MVC vs ADR Pattern HOT 2
- Link in docs is wrong HOT 1
- logger test's settings are useless HOT 4
- How to use loggerFactory in Routing/JwtAuth
- Using skeleton in a subdirectory HOT 2
- Handling relationships within the skeleton structure HOT 4
- create-project is not downloading some files HOT 3
- Problem getting JWT to work as per your eBook HOT 6
- Undefined function 'uuid_create' in LoggerFactory HOT 2
- 404 in /docs/configuration.md HOT 2
- How to handle query error ? HOT 5
- How to handle data from repository to presentation as JSON for REST API HOT 4
- Add demonstration URL HOT 5
- Letting the bin/console.php setup command have non-interactive mode HOT 5
- Any auth in your sceleton? HOT 2
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 slim4-skeleton.