PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I can't hardcode the URI for the page/script as it's name lies in the users hands, which "can" be changed at any time. Basically web pages are being generated through index.php coming from a database.
You can make the URI be part of the system config that the user has access to, along with database login info and all that, then use that in your registry or as a define or whatever. I have seen a lot of packages ask for this in a configuration script, and the script tries to guess it and fill in the form for you, its not always correct though, which is why its nice to have the user optionally type it in.
Another option is to determine it in the code and pass it around.
Begby wrote:You can make the URI be part of the system config that the user has access to, along with database login info and all that, then use that in your registry or as a define or whatever. I have seen a lot of packages ask for this in a configuration script, and the script tries to guess it and fill in the form for you, its not always correct though, which is why its nice to have the user optionally type it in.
Another option is to determine it in the code and pass it around.
Each page is dynamically generated and it's URI is dynamically determined so asking a user for it isn't feasible unfortunately. Can you just confirm that mod_rewrite is indeed responsible for this issue or am I remembering completely wrong in that
A link of type '?var=val' on whateverpageiamonrightnow.php will post to whateverpageiamonrightnow.php?var=val.
Your mod_rewrite rule is taking anything that is requested of your server that is not 'images/' and throwing it at index.php?page=whateverwasrequestedintheurl.
A very easy test is to make three files: f1.php, f2.php and f3.php and in each of them put the following code: