Rusty.Metal Posted March 28, 2003 Share Posted March 28, 2003 How could i go about getting a php script take varables as such, .php/VARABLE1/VARABLE2.png example, .php/blue/hello.png i belive i need to use a function but im lost with them Link to comment Share on other sites More sharing options...
0 epton Posted March 28, 2003 Share Posted March 28, 2003 do a search for "search engine friendly urls" on google. there are lots of tutorials. Link to comment Share on other sites More sharing options...
0 Tim Dorr Veteran Posted March 28, 2003 Veteran Share Posted March 28, 2003 $vararray = explode( "/", $_SERVER['PATH_INFO'] ); That'll give you an array of { '.php', 'blue', 'hello.png' } in your example. Link to comment Share on other sites More sharing options...
0 Rusty.Metal Posted March 28, 2003 Author Share Posted March 28, 2003 opps when i ment .php i ment it has the script like .... mysite.com/site.php/green/bye.png ;) Link to comment Share on other sites More sharing options...
0 Tim Dorr Veteran Posted March 28, 2003 Veteran Share Posted March 28, 2003 well, then my code would give the array: { 'green', 'bye.png' } :) Link to comment Share on other sites More sharing options...
0 Rusty.Metal Posted March 29, 2003 Author Share Posted March 29, 2003 any tutorials on arrays? a way to make $something = green and $somethingelse = buy.png? Link to comment Share on other sites More sharing options...
0 Rusty.Metal Posted March 29, 2003 Author Share Posted March 29, 2003 i got it :) $varables = explode( "/", $_SERVER['PATH_INFO'] ); echo "$varables[1]"; // Would echo red echo "<BR>" echo "$varables[2]"; // Would echo 56.png Link to comment Share on other sites More sharing options...
Question
Rusty.Metal
How could i go about getting a php script take varables as such,
.php/VARABLE1/VARABLE2.png
example, .php/blue/hello.png
i belive i need to use a function but im lost with them
Link to comment
Share on other sites
6 answers to this question
Recommended Posts