Simple chat facility - if file exists not working |
(06-22-2020, 11:02 AM)jreklund Wrote: @christaliise: What exactly dosen't work? It dosen't find the file? Thanks jreklund. I want first a search for the file, if it is found, then redirect, to 'chris/john/chat' (keep in mind it is chris that is logged in) page where the previous conversations will be exposed. That does not work as it redirects whether or not the file exists. If the file is not found then it creates the 'chris/john/chat' & 'john/chris/chat' Controllers & view pages. The conversations can begin. That part I have working but it needs attention particularly in the variables for example. PHP Code: $lcuser = $this->session->userdata('user_name'); redirect is not a problem. Yes, I have Controllers for all the pages, for example Controllers for "Chris/Chat", "John/Chat", "Chris/John/Chat, & John/Chris/Chat. I dont understand your "correct way of building a path"? Can you explain? I guess by "DIRECTORY_SEPARATOR" you mean forward slash? [/]. But I notice your full stops & single quotes ['.]. When doing a fwrite I use double quotes, spaces & full stops [" . ]. |
Welcome Guest, Not a member yet? Register Sign In |