0

当我针对 SESSION 自定义我的 php.ini 文件时,我没有看到任何相关内容,并且对该主题的搜索也没有发现任何相关内容。

SESSION 数据是可靠存储的,并且可以修改,SESSION 本身没有问题。但令人烦恼的是,每次我希望查看数据时,Windows 都会抱怨它无法打开未知类型的文件...如果我能够命名 SESSION 文件,则可以避免一直通过该对话框选择 NotePad2 . 例如添加“.txt”

示例原样:
sess_LIH7by43o4ufbql3rvERvp9vho8uHp9u3l4jnpw93rhlkrjdnvv98y29o8u3hvpo8w734h

我想要什么:sess_LIH7by43o4ufbql3rvERvp9vho8uHp9u3l4jnpw93rhlkrjdnvv98y29o8u3hvpo8w734h.txt

4

3 回答 3

0

As far as I know, you can't modify the session filenames.

Instead, try simply having your text editor open, and dragging the files into the text editor.

于 2013-10-30T05:41:19.523 回答
0

Why don't you set a permanent open type with Notepad ++ ?

Right click the SESSION token and choose, Open with -> Notepad++ , and Select the below checkbox where it says

"Always use the selected program to open this kind of file".

Click OK.

EDIT

That was the first thing tried, but the option "Always use the select/..." stays greyed out in the dialogue box. Because reasons. And it is Windows.

  • Open Control Panel / Default Programs.

  • Select the Associate a file type or protocol with a program link.

  • After all of the file types load, select the file type you wish to configure and click the Change Program button.

  • If the program is not in the Recommended section, click the down arrow for Other Programs.

  • If it is still not visible, select the Browse button and navigate to where the programs *.EXE file is located.

  • Select the program and click OK.

If that doesn't work, Here's a thread from SuperUser

于 2013-10-30T05:41:25.800 回答
0

我不建议这样做,但如果文件扩展名非常重要,您可以编写自己的会话处理程序,以您喜欢的任何文件名格式保存会话。

http://www.php.net/manual/en/function.session-set-save-handler.php

于 2013-10-30T06:29:10.790 回答