English 中文(简体)
• 防止PHP向PHPSESSID的 co子发出要求?
原标题:Prevent PHP from sending the PHPSESSID cookie with requests?

我正在使用PHP产生的动态图像内容。 但是,对于这种要求,PHPSESSID的表象正在沿途发送,这是一种废物。

是否有可能防止PHP将这一 co子寄给PHP档案? 还是完全需要PHP工作?

感谢你们的时间!

最佳回答

浏览器将发送任何适用于某种道路主力组合的 co。 你们对此没有控制权,除非使用不同的途径和领域。 因此,许多网站使用static content areas

问题回答

公共卫生和公共卫生部的会议职能使用这一工具。 如果贵网站不使用会议,那么这或许就没有显示。

铭记 co子是由浏览器送来的,而且你对其传播没有控制。

you re saying "dont use cookies for sessions, use a phpsessid as a get parameter" php deprecated this for a reason. Cookies will always be sent to the same domain. If you really want to avoid the MINIMAL overhead, resources which dont need cookies should be in a separate domain, thus the cookie wont be sent. IE. static.domain.com for static content. It s not worth the hassle, honestly.

i 进行抽查,这是为我工作的唯一解决办法。

在您的查阅档案中添加以下法典:

RewriteCond %{ RequestRY_STRING} PHPSESSID=*$

Rewrite Rule ∗ %{REquestST_URI}? [R=301,L]





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签