insanity381 Posted June 13, 2006 Share Posted June 13, 2006 Uummm....Well the description of this topic kind of gave it away; how do you do that thing:index.php/something/maybesomethingelse/thanks,Simon Link to comment Share on other sites More sharing options...
Chocolate570 Posted June 13, 2006 Share Posted June 13, 2006 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 More sharing options...
Little Goat Posted June 14, 2006 Share Posted June 14, 2006 no, he maens make a php file act like a folder such as index.php/hi/ displays something different from index.php.I've seen it too. Link to comment Share on other sites More sharing options...
DarkElf Posted June 14, 2006 Share Posted June 14, 2006 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 More sharing options...
aspnetguy Posted June 14, 2006 Share Posted June 14, 2006 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 More sharing options...
insanity381 Posted June 14, 2006 Author Share Posted June 14, 2006 Naaa....Sorry, I thought this would be a simple, nice, standard thing. I know how to use GET and POST, I just wondered about this thing, like for example at:http://veerle.duoh.com/index.php/blog/archivesIf it's not a standard-compliant thing, I'm not bothered. Thanks anyway guys. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 14, 2006 Share Posted June 14, 2006 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: http://context.cx/component/option,com_docman/Itemid,48/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 More sharing options...
DarkElf Posted June 15, 2006 Share Posted June 15, 2006 But you do have to set up the server so that it knows not to look for a directory called that.<{POST_SNAPBACK}> Which assumes you have that kind of control over your server (if you are renting webspace that is quite unlikely!) Link to comment Share on other sites More sharing options...
justsomeguy Posted June 15, 2006 Share Posted June 15, 2006 That's right, like aspnetguy said you would need to install and setup something like mod_rewrite, which you wouldn't be able to do if you don't have root access to the server. Link to comment Share on other sites More sharing options...
insanity381 Posted June 20, 2006 Author Share Posted June 20, 2006 Oh okay. Thanks guys. I'm actually on www.ripway.com, so that's that.Cheers again,Simon Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now