Can i access the return value of a function in PHP to .htaccess? for example, i have a PHP function, say, "question($num)" which has a return value, say, "Answer". I want to put that "Answer" as part of the URL, say, www . mydomain.com/index.php?q=q1&ans=Answer. Now, my questions are, 1) is that possible? 2) What do i need to study(learn) to do that?
Thanks.
jdMorgan
2:32 pm on May 18, 2005 (gmt 0)
.htaccess executes when an HTTP request is received from the client. So if php creates a link containing the variable in a query string for the user to click on, or generates a redirect which includes the variable in the URL query string, you can then access the variable with .htaccess when it arrives in the new HTTP request at the server.
But no, php cannot internally 'call' .htaccess, because once php is running (in the content-handling API phase), it is too late to invoke .htacess.