防止PHP在响应中透明地转换链接[关闭]

In my PHP response I am setting the header "Content-type: application/binary" but that is not stopping PHP from rewriting my response.

How do I prevent PHP from transparently transforming the response to insert the PHPSESSID when the use_trans_sid has been enabled by my webhost? Is it possible to do this without using ini_set or modifying the htaccess file?

Never tried, but according to the documentation, output_reset_rewrite_vars() does the right thing.

This is where you can change INI settings. session.use_trans_sid has a mode of PHP_INI_ALL, that leaves you with

  1. ini_set()
  2. php.ini
  3. .htaccess
  4. .user.ini
  5. httpd.conf

Edit: disregard this, today I learned about output_reset_rewrite_vars