For a complete sample Nginx+PHP-FPM config, view this how-to: Nginx & PHP-FPM
For a complete sample Nginx+PHP-FPM config, view this how-to: Nginx & PHP-FPM
Below I have created an Html helper with methods to help me locate directories of my assets dynamically. Such assets may include CSS, JavaScript and images.
The Definitive Guide introduces the fundamentals of managing URLs in a Yii application. In this tutorial, we introduce a practical technique that can quickly turn your application into using search-engine-friendly URLs.
This guide is for more or less advanced users. If you just started with Yii or didn't worked with any web-framework before, you may should come back later :-)
Many applications wish to obtain parts of the URL for the current page (the hostname, the query string, etc.), and the CHttpRequest
class wraps various $_SERVER
variables to break down the URL into its constituent parts.
Maybe it looks simple, but some time ago I need some time to find a solution of this case. I finally got it, and I want to share that I also experienced such cases. So that it can make reference.
Many time for SEO porpouses is important that each page will have a unique address.
In this article, we introduce an approach that allows automatic hyphenation of the route part in URLs.
In this article, I will describe how to manage URLs for a Website that has both secure and nonsecure content.
Sometimes writing views like
Here you learn to create and set a simple ahref-link to logout the current user.
Knowledge is necessary to determine the address of the controller in a single layer system. This allows you to quickly search and painlessly produce refactoring controllers and their addresses.
There is an issue on Yii2 to redirecting / urls to /frontend/web.
In other words we need a way to hidden /frontend/web from addresses.
We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)
We can easily have a multilingual site if we put a "lang" parameter that comes via GET. For example:
Upon creating my Yii2 Members System, I have ran into a few snags along the way that forced me to extend and bend Yii2 to my will.