【phpcms-v9】缓存目录caches下的各个文件的作用
原文地址:http://blog.csdn.net/yanhui_wei/article/details/7912957
第一:caches/caches_commons目录下缓存文件:
[html] view plaincopy
1.caches/caches_commons/caches_data/category_content.cache.php:
所有栏目对应的站点ID
2.caches/caches_commons/caches_data/category_content_1.cache.php:
当前站点id下所有栏目的详细配置信息
3.caches/caches_commons/caches_data/category_item_1.cache.php:
当前模型id下 各栏目下的数据量(0-代表没有文章 8-代表有8篇文章)
4.caches/caches_commons/caches_data/model.cache.php:
模型的配置信息:1-文章模型 2-下载模型 3-图片模型
5.caches/caches_commons/caches_data/sitelist.cache.php:
所有站点的配置信息
6.caches/caches_commons/caches_data/urlrules.cache.php:
所有的url重写规则
7.caches/caches_commons/caches_data/urlrules_detail.cache.php:
所有的url重写规则详细配置信息
8.caches/caches_commons/caches_data/position.cache.php:
推荐位的配置
9.caches/caches_commons/caches_data/poster_template_1.cache.php:
广告的配置
10.caches/caches_commons/caches_data/vote.cache.php:
投票的配置
11.caches/caches_commons/caches_data/mood_program.cache.php:
表情的配置
第二:caches/caches_template目录下缓存文件:
[html] view plaincopy
1.caches/caches_template/模版风格/模块名/文件:编译文件路径
如:phpcms/templates/default/content/index.html 首页公共模板文件(含pc标签)
经过编译后放到了
caches/caches_template/default/content/index.php 首页编译文件
第三:caches/configs目录下缓存文件:
[html] view plaincopy
1.caches/configs/cache.php: 缓存配置,分两种:文件缓存和memcache缓存
2.caches/configs/database.php: 数据库配置信息
3.caches/configs/route.php:默认路由配置
前台默认的路由是:index.php?m=content&c=index&a=init
4.caches/configs/system.php:系统变量配置文件
第四:caches/caches_model目录下缓存文件
[html] view plaincopy
1.caches/caches_model/content_form.calss.php:后台内容添加页表单的动态生成
主要用来获取内容添加页左侧所有动态表单的生成
caches/caches_model/content_input.calss.php:后台内容添加页添加文章内容时,对提交的表单数据进行验证和过滤
caches/caches_model/content_out.calss.php:前台显示文章内容时,对要显示的内容进行验证和过滤
2.caches/configs_model/model_field_1.cache.php:文章模型字段的详细配置
3.caches/configs_model/model_field_2.cache.php:下载模型字段的详细配置
4.caches/configs_model/model_field_3.cache.php:图片模型字段的详细配置
5.caches/configs/system.php:系统变量配置文件
逐步更新中。。。
[html] view plaincopy
<pre class="brush:php;toolbar:false">
<pre class="brush:php;toolbar:false">
<pre class="brush:php;toolbar:false">
<pre class="brush:php;toolbar:false">
<pre class="brush:php;toolbar:false">
<pre class="brush:php;toolbar:false">
<pre class="brush:php;toolbar:false">
<pre class="brush:php;toolbar:false">

Effective methods to prevent session fixed attacks include: 1. Regenerate the session ID after the user logs in; 2. Use a secure session ID generation algorithm; 3. Implement the session timeout mechanism; 4. Encrypt session data using HTTPS. These measures can ensure that the application is indestructible when facing session fixed attacks.

Implementing session-free authentication can be achieved by using JSONWebTokens (JWT), a token-based authentication system where all necessary information is stored in the token without server-side session storage. 1) Use JWT to generate and verify tokens, 2) Ensure that HTTPS is used to prevent tokens from being intercepted, 3) Securely store tokens on the client side, 4) Verify tokens on the server side to prevent tampering, 5) Implement token revocation mechanisms, such as using short-term access tokens and long-term refresh tokens.

The security risks of PHP sessions mainly include session hijacking, session fixation, session prediction and session poisoning. 1. Session hijacking can be prevented by using HTTPS and protecting cookies. 2. Session fixation can be avoided by regenerating the session ID before the user logs in. 3. Session prediction needs to ensure the randomness and unpredictability of session IDs. 4. Session poisoning can be prevented by verifying and filtering session data.

To destroy a PHP session, you need to start the session first, then clear the data and destroy the session file. 1. Use session_start() to start the session. 2. Use session_unset() to clear the session data. 3. Finally, use session_destroy() to destroy the session file to ensure data security and resource release.

How to change the default session saving path of PHP? It can be achieved through the following steps: use session_save_path('/var/www/sessions');session_start(); in PHP scripts to set the session saving path. Set session.save_path="/var/www/sessions" in the php.ini file to change the session saving path globally. Use Memcached or Redis to store session data, such as ini_set('session.save_handler','memcached'); ini_set(

TomodifydatainaPHPsession,startthesessionwithsession_start(),thenuse$_SESSIONtoset,modify,orremovevariables.1)Startthesession.2)Setormodifysessionvariablesusing$_SESSION.3)Removevariableswithunset().4)Clearallvariableswithsession_unset().5)Destroythe

Arrays can be stored in PHP sessions. 1. Start the session and use session_start(). 2. Create an array and store it in $_SESSION. 3. Retrieve the array through $_SESSION. 4. Optimize session data to improve performance.

PHP session garbage collection is triggered through a probability mechanism to clean up expired session data. 1) Set the trigger probability and session life cycle in the configuration file; 2) You can use cron tasks to optimize high-load applications; 3) You need to balance the garbage collection frequency and performance to avoid data loss.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Chinese version
Chinese version, very easy to use

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 Linux new version
SublimeText3 Linux latest version
