parameters: (self,get)
docstring: get.id      site id
          get.act     0/1
          :param get:
          :return:
docstring_summary: get.id      site id
          get.act     0/1
          :param get:
          :return:
docstring_tokens: get . id site id get . act 0 / 1 : param get : : return :
function: def set_php_session_path(self,get):
          '''
          get.id      site id
          get.act     0/1
          :param get:
          :return:
          '''
          if public.get_webserver() == 'openlitespeed':
              return public.returnMsg(False, "NOT_SUPPORT_OLS")
          import panelSite
          site_info = public.M('sites').where('id=?', (get.id,)).field('name,path').find()
          session_path = "/www/php_session/{}".format(site_info["name"])
          if not os.path.exists(session_path):
              os.makedirs(session_path)
              public.ExecShell('chown www.www {}'.format(session_path))
          run_path = panelSite.panelSite().GetSiteRunPath(get)["runPath"]
          user_ini_file = "{site_path}{run_path}/.user.ini".format(site_path=site_info["path"], run_path=run_path)
          conf = "session.save_path={}/\nsession.save_handler = files".format(session_path)
          if get.act == "1":
              if not os.path.exists(user_ini_file):
                  public.writeFile(user_ini_file,conf)
                  public.ExecShell("chattr +i {}".format(user_ini_file))
                  return public.returnMsg(True,"SET_SUCCESS")
              self._edit_user_ini(user_ini_file,conf,get.act,session_path)
              return public.returnMsg(True, "SET_SUCCESS")
          else:
              self._edit_user_ini(user_ini_file,conf,get.act,session_path)
              return public.returnMsg(True, "SET_SUCCESS")
function_tokens: def set_php_session_path ( self , get ) : if public . get_webserver ( ) == 'openlitespeed' : return public . returnMsg ( False , "NOT_SUPPORT_OLS" ) import panelSite site_info = public . M ( 'sites' ) . where ( 'id=?' , ( get . id , ) ) . field ( 'name,path' ) . find ( ) session_path = "/www/php_session/{}" . format ( site_info [ "name" ] ) if not os . path . exists ( session_path ) : os . makedirs ( session_path ) public . ExecShell ( 'chown www.www {}' . format ( session_path ) ) run_path = panelSite . panelSite ( ) . GetSiteRunPath ( get ) [ "runPath" ] user_ini_file = "{site_path}{run_path}/.user.ini" . format ( site_path = site_info [ "path" ] , run_path = run_path ) conf = "session.save_path={}/\nsession.save_handler = files" . format ( session_path ) if get . act == "1" : if not os . path . exists ( user_ini_file ) : public . writeFile ( user_ini_file , conf ) public . ExecShell ( "chattr +i {}" . format ( user_ini_file ) ) return public . returnMsg ( True , "SET_SUCCESS" ) self . _edit_user_ini ( user_ini_file , conf , get . act , session_path ) return public . returnMsg ( True , "SET_SUCCESS" ) else : self . _edit_user_ini ( user_ini_file , conf , get . act , session_path ) return public . returnMsg ( True , "SET_SUCCESS" )