In order to be safe, it is also necessary to take into account the editor switching management and development without having to care about the directory name. It is only necessary to modify the names of the application directory and tp directory when deploying.
In order to improve the loading efficiency of tp, absolute paths are always given to app and tp. That is, using realpath to locate
realpath returns an absolute path, which starts with a slash root tree in lx. The parameter can be a file name or Directory name. Return result: If it is a file, it will have the file name at the end. If it is a directory, even if there is a slash at the end of the parameter, the trailing slash will be deleted.
Therefore, if THINK_PATH is defined, add / at the enddefine('THINK_PATH', realpath('./Think').'/');
The difference between vim's f and t keys: f is exactly to the specified character , and t: to is to jump to the front of the specified character The
difference between 0 and ^: 0 is the first character, whether it is a blank character or not; ^ is to jump to the first non-whitespace character. There is only one symbol to jump to the end of the line $
In vim, in addition to the operation of the line, the operation commands y, d, c, x, etc. are combined with the jump conditions f, t, etc., the operation is not only in the unit of behavior, you can operate wherever you want. For example dt)
...
In vim, the meaning of the word, an English word is a word, and multiple consecutive Chinese characters can only be counted as one word. The unit of the text is the word w, line jk, etc., which are not only the unit of the text, but also the jump command of vim .
Therefore, the positional relationship between symbols such as operation commands d, c, y, x, etc. and text content units such as wjk should be: operation command + multiple + unit : such as: d2w, d4j, y2w, etc.,
not : Multiple + unit + operation command, for example: 4wd: Because as mentioned above, 4w is already a command, it will jump 4 words backward, then the command has been executed, and when it reaches d, In fact, there is only one single-character d command, which is definitely not the original intention.
A very important thought is, try not to use manual symbols such as br to adjust the structure of html, but to use "semantic tags" to organize the content. For example, in terms of p, span, div, font size, etc., try your best to Don't use font size or something, but use h1, h2...
The format of chmod: chmod [who] [+-=] [mode] file1 file2...
Generally speaking, the creator of the file/directory, automatically becomes the owner, automatically has "read, write and execute" permissions
- By default, chmod only modifies the access mode for the current file or directory (only one level of directory). To recursively modify permissions on subdirectories under the directory, use -R or --recursive
- You can modify multiple files or directories at once without having to use multiple identical commands to modify, which is faster chmod +x file1 file2 dir1
- who can be a combination of multiple users, such as: ug+x
- You can set permissions for multiple different users in one command, separated by commas, for example: g+w, o+x
- In addition to the plus and minus signs, the access mode can also be used with an equal sign.
=u =g
, etc., indicating the same permissions as the owner and group.
[ root@localhost html]# chmod o+w Honda Public -R
Generally speaking, files are accessed locally (console), read and written, and edited as the owner, but they are accessed as other (such as apache) when accessed through the network /web/localhost.
To allow apache to access all directories below the web root site (solving the linux write permission problem), it is only required to start from the html directory (localhost website root) -> access to all subdirectories under it can be "read + write" by apache That's it, there's no need to require that all directories from /var/www/ be read and written by apache.
- Under the parent directory, files or subdirectories of other owners who are different from the parent directory owner can be stored.