0
Hello, I think this is simple, I am working on a project in which I need to start 3 strings on 80% of the system pages, in php, so what would be the best method for the user to just change the text in a document, and I can perform the inclusion on all pages???
explaining better, I will create a configura.php file, where the client will open using a compiler or text editor and set the value of the 3 strings separately.
ps: I’ve been advised to use Session, but my question is how can I load 3 separate strings using Session.
You will no longer include the file
configura.php
in all files? If yes, you don’t have to do anything else. I don’t see why use sessions if the value of these variables is constant.– Woss
Anderson, I can include the yes file, you could give me an example of the syntax to assign the values coming from configure.php to variables of any page?
– Daniel Gomes Da Silva Moreira
Sets the variables in
configura.php
same and in every file you include it they will exist.– Woss
Andreson, something like that might conflict with variables of the same name, right? But thanks for the tip, I’ll test to see if it works 100% here!
– Daniel Gomes Da Silva Moreira
puts the comment on Answer the Question so I can give you the reputation points.
– Daniel Gomes Da Silva Moreira
The reason for the closing vote is that there is no way of saying what is the best way to resolve it. From what you described it seems not necessary to use session variables. The first thing I imagined is constant use, but then you say the user will edit a config.php, and that changes all the logic. What is the format of this config.php and how is it accessed? If you can show what this file looks like, I think you can make the question more objective. Otherwise, you will get answers from others, throbbing what you could do. But using Sesssion, I find it unlikely.
– Daniel Omine