开发者

Running script in eclipse from root directory

开发者 https://www.devze.com 2023-03-07 00:32 出处:网络
I have a script named INDEX.php that runs from root directory /开发者_运维知识库/htdocs because that script needs to use $SESSION variables and other things in sub folder.

I have a script named INDEX.php that runs from root directory /开发者_运维知识库/htdocs because that script needs to use $SESSION variables and other things in sub folder. Now If I try to debug using eclipse, it asks me new work space, even if i put new work space under htdocs. still the settings inside script are lost.

How to resolve this? How to set dev env in eclipse so that it treats as if code is run from htdocs?


This is a poorly asked question. What do you mean "script needs to use $SESSION variables and other things in sub folder"? If you're referring to $_SESSION, it has nothing to do with folders.

If you're saying that values within $_SESSION are not staying there from one execution to the next, then you need to make sure that cookies are enabled, and that whatever browser/environment you are using to view the page supports cookies.

The cookie holds the ID that identifies the session that allows PHP to find the session data. You can also pass the ID from one URL to another, but that probably won't work in your case.

0

精彩评论

暂无评论...
验证码 换一张
取 消