Hi,
i never had problems with switch action and flash ... i put switch function on a php document which had flash as a navigation, than i used index.php?p= to call the pages ...
now i have main directory in which i have index.php on this index.php i have flash navigation. i also have a directory with some files in that main directory to which i want to link ...
<?php switch ($HTTP_GET_VARS[p])
{
//Default - case
case 'ir':
default:
include 'ir/ir.html';
break;
}
?>
how do i put the path for include??? this way is not working ... pls help
best regards
heki
switch function and directories
Started by HEki_, Dec 26 2005 04:48 AM
4 replies to this topic
#1
Posted 26 December 2005 - 04:48 AM
#2
Posted 26 December 2005 - 12:45 PM
Man, that script isn't even working correctly I bet. Its because its wrong.
Now to include the ir/ir.html, simple do index.php?page=ir
where it says 'pathto/news.php', you can put your news url there or the homepage there.
I hope that helps. It should work now. Good luck!
<?php
switch ($HTTP_GET_VARS[p])
{
case 'ir':
include 'ir/ir.html';
break;
default:
include 'pathto/news.php';
break;
}
?>
Now to include the ir/ir.html, simple do index.php?page=ir
where it says 'pathto/news.php', you can put your news url there or the homepage there.
I hope that helps. It should work now. Good luck!
#3
Posted 26 December 2005 - 01:33 PM
The way he has it now should work just fine. But i don't understand what you're trying to do.
I know it's nothing to do with including the news, but could you give a specific example of what you mean by "how do i put the path for include."
Also, according to what you said, the first paragraph on the following page should help, but if i'm right, it may not.
http://php.net/manua...ion.include.php
I know it's nothing to do with including the news, but could you give a specific example of what you mean by "how do i put the path for include."
Also, according to what you said, the first paragraph on the following page should help, but if i'm right, it may not.
http://php.net/manua...ion.include.php
#4
Posted 31 December 2005 - 03:09 PM
Ok, the thing is:
www.heki.clan-sun.com
at the top you see the navigation. i load everything in the iframe ... but i would like to load via include function and php ... couse something isnt working right now. and it would be easier to change everything via include function than to go into the flash and play with that ...
so in the navigation i tried it as i have shown u above, but it didnt work, so i am guessing my path wasnt correct ... and it has to be shown differently with php. that is why i am asking you guys how must i show the path to the file ...
main directory:
index.php (with navigation and include function)
---->IR directory:
---->with ir.html (to which i want to link when the button on that index.php will be pressed)
hope i made it clear ...
www.heki.clan-sun.com
at the top you see the navigation. i load everything in the iframe ... but i would like to load via include function and php ... couse something isnt working right now. and it would be easier to change everything via include function than to go into the flash and play with that ...
so in the navigation i tried it as i have shown u above, but it didnt work, so i am guessing my path wasnt correct ... and it has to be shown differently with php. that is why i am asking you guys how must i show the path to the file ...
main directory:
index.php (with navigation and include function)
---->IR directory:
---->with ir.html (to which i want to link when the button on that index.php will be pressed)
hope i made it clear ...
Edited by HEki_, 31 December 2005 - 03:10 PM.
#5
Posted 03 January 2006 - 08:59 AM
try
./ir/ir.html
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
