Jump to content

Quick idiot question


insanity381

Recommended Posts

Do you mean index.php?thing=1234&blah=424?If so, then just use this code.

<?php$thing=$_GET['thing'];$blah=$_GET['blah']echo $thing.$blah;?>

If you used that, you'd get 1234424. :)Hope that helps.Choco

Link to comment
Share on other sites

Not sure where the slashes come in, but I think you can do it using query strings.The query string variable is added to the url: www.mywebsite.com/index.php?page1To retrieve the variable use this:

$variable = $_SERVER['QUERY_STRING'];

The you can then use variable in your code, this could for example be the name of a file that contains the content to be displayed on the page, therefore you can use your index.php file as a template and import the content using something like this:

$content = file_get_contents($variable.'txt');echo '<p>'.$content.'</p>';

Link to comment
Share on other sites

my guess is that it would be done similairly to url re-writing using mod_rewrite form apache.using slashes AFAIK is not a standard method for passing info and would have to be setup in apache how to handle it.

Link to comment
Share on other sites

I don't think it's necessarily against a standard, but you do have to have control over the server to set that up. I assume you mean something like this:

I assume that what is happening there is there is a file in the component directory called index.php that gets the parameters "option" with the value "com_docman", and "Itemid" with the value "48". But you do have to set up the server so that it knows not to look for a directory called that.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...