1
votes

I have a pretty simple question but I am really new to php. I have just downloaded an interesting chat plugin called comechat. Precisely, there is a cometchat direvtoru that contains php files. The latter only need the $_SESSION['user'] to process. But it didn t and I think I have a path problem for my code to transmit the user's session info.

On the side of my code, I have the following architecture : essentially three directories

  • classes (containing all my php files except index.php, the account.php generate the user session)
  • templates (containing all my html files)
  • public containing - index.php - css directory - js directory - cometchat directory

index.php process the php files of 'classes' and then the latter files process the html files using the smarty engine.

I tried to call the config files of the cometchat directory by proceeding to a require_once path/config.php in the index.php but it didn t work. So I have perhaps a silly question but : if I call this config file in index.php, and knowing that index.php instanciate an account class of account.php file (where the user's session is created), does the require_once path/config.php will retrieve the session info. More generally, could anypne help to deal with this problem?

Best, Mehdi

1
The javascript and the css of cometchat plugin works correctly ? - epsilones

1 Answers

1
votes

Perhaps you should call for a require_once index.php in the config file of the cometchat directory, in the config file of the cometchat directory, something like so :

require_once('../index.php')