Why 2 index.php pages here? [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
trying to implement the MCV based off Dary's video
https://www.youtube.com/watch?v=n2yeK6LwSII
I can't understand why we have an index.php in the public folder and index.php in the view/pages folder I honestly can't figure out how the one in the view/pages gets called.
I am trying to configure this on IIS as well
https://github.com/Darynazar/MVCFramework

public/index.php is the entry place of your app.
all other PHP files will include after that, so the index.php in view is not the enry point. you can rename it to whatever you want.

Related

Laravel Website multiple homepage. User can change [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I want to know the way to use my multiple homepage design in Laravel. And User can switch homepage design from site settings like wordpress. Can anyone help me to find the way to make laravel website with multiple home page system?
The question is quite general so I'll share my personal approach:
I create several template folders in my view directory with the same blade file structure inside.
Then from the Controller, I just change the call to the view according to the requested template:
return view($template_name . '.index');

How to link HTML CSS and PHP together? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I created a new PHP project using Netbeans and i have some trouble referencing the very same css file to all my links in the project.
This is what I have:
If you know why this is happening please let me know.
It's a path problem
In register.php you should use ../css/style.css because register.php is in a subdirectory (links), index.php is in root path, then you can use css/style.css

while using cakePHP framework, but still want to write customised .htaccess for RewriteRule [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm using CakePhp but I still need to use .htaccess to make special rules for my site's RewriteRule. Ex: if request is with certain filetype (png), then rewrite to certain URL.
Could you help me how to achieve this?
Using Cake PHP shouldn't stop you from adding redirect rules to your .htaccess file.
Check out this similar question for some inspiration. .htaccess for cakephp

How to display WordPress Posts in a CakePHP Template/**/*.ctp file? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Is it even possible? If so, do I need to download a plugin to make it work?
(The Wordpress directory is located in webroot/blog/)
I don't want to customize my entire wordpress blog to look like my website when I could just (if possible) display all blog posts on a .ctp file.
Works perfectly with the WordPress API! Thanks.

How can i remove "index.php" and redirect to home url [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
For example if my home page url is "mywebsite.com/index.php", I want to access index.php on "mywebsite.com"
what is the standard procedure that every website uses ?
You must create an .htaccess file and write the following:
DirectoryIndex index.php
The file must be inside your folder with index.php

Categories