After enough experience with php coding, I realized that there are still many things I'm not aware of! One of my newest problems is as follows:
I have a webpage which has all its active files under www/web. Inside this folder, there is another folder www/web/pages/ which includes some php scripts. There is an include folder www/web/include for shared scripts between regular pages. I have faced two problems which I have never faced before.
1. Inside ~/pages, my sessions which have been set somewhere else don't work! echo $_SESSION['name'] prints nothing while session_start() is already executed. At the same time, the session works in www/web.
- Inside ~/pages, I have included some files from ~/includes. These files are correctly included but when I attempt to access the functions or variables defined there, I get an error saying function could not be found!
Anyone has experience with these issues? Perhaps php has changed since I left php programming for a while. 🙂