codeigniter - PHP include is not including existing file content -


in application/config.php have include function so

include($_server['document_root'].'/config/log.php'); 

or

include($_server['document_root'].'/config/session.php'); 

obviously config files in root/config/whatever.php. since moved files new server include not working probably. if write name of file i'll error if file exists not going include constant of , ci through error such

in order use session class required set encryption key in config file.

as solution can include contact file in config.php (but that's not want since use came details in several separate ci applications). appreciate better solution.

many in advance

p.s. i'm using php 5.5.9-1ubuntu4.11 (cli) (built: jul 2 2015 15:23:08)

update:

echo $_server['document_root'].'/config/session.php'; ///returns : var/www/html/config/session.php include($_server['document_root'].'/config/session.php'); //return nothing , not including vars since encryption key error include($_server['document_root'].'/config/sessionsfgdfgsdf.php'); //gives error 

this error occurred because ifyou not using encrypted sessions, must set encryption key in config file used aid in preventing session data manipulation

to save key application/config/config.php, open file , set:

$config['encryption_key'] = "your key"; 

also read session class , setting key


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -