|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
including pages without SSI
I would like to include pages in my site
without using frames or Iframes but my host doesnt allow my access to SSI is it possible to do this another way and how do i do this Last edited by Decoder : February 18th, 2002 at 02:00 PM. |
|
#2
|
||||
|
||||
|
Yes, it's possible.
|
|
#3
|
||||
|
||||
|
<<
but my host doesnt allow my access to SSI >> Including pages or script in HTML page, you need to use Server side includes.tell us in details ,what you are trying to do.
__________________
SR - webshiju.com www.lizratechnologies.com "The fear of the LORD is the beginning of knowledge..." |
|
#4
|
|||
|
|||
|
i have my main page page
with links on left when i click on a link i want it to open in the middle table without completly loading a new page right now i'm doing that with iframes which is realy ugly cause it has to use scroll bars it doesnt resize the middle table like if i was using ssi |
|
#5
|
||||
|
||||
|
<<
when i click on a link i want it to open in the middle table without completly loading a new page >> No ,you need to use frames if you don't want to refresh full page again and again while clicking on left links. Or you may try layers or something for doing it. you cannot use ssi for doing that action. But you may try with a server side script (eg: your.php). so that you can write logic in the script saying if someone clicks on a particular link then replace central portion with a certian piece of code.but still full page will refresh. |
|
#6
|
|||
|
|||
|
well is there any way to get the iframe to resize the middle table if i include a file that is realy long
so i dont have 2 scroll bars www.decodethis.com you will see what i mean in the personnel section and how would i go about doing it with php??? will it have to dish out the bandwidth for my graphics with each page refresh??? |
|
#7
|
|||
|
|||
|
nice site. it's perdy
![]() i wouldn't bother with iframes if you can use php. add a query string to your links: <a href="<?=$PHP_SELF?>?person=SRT.God">SRT.God</a> this will send the link to the current page with the name as a variable $person. you could then use that variable to include the information about the player where you have your iframe now: include( "people/$person"); that should take care of it. browsers usually cache images, so they're only downloaded the first time a person visists the page. it's faster, and doesn't suck your bandwidth. if your provider doesn't support php, you're probably gonna have to reformat the pages you display in the iframes. make them skinnier (smaller text, different layout). |
|
#8
|
|||
|
|||
|
ok well
www.decodethis.com/new.php is my new layout can you tell me how to incorporate that into my site |
|
#9
|
|||
|
|||
|
ok i dont care if the page refreshes i just dont want to have a whole bunch of pages more then i have to
i just want to have my index.php with a few tables then include all of my links from links.php when i click on one of my links i want it to open in the "middle" table i want it to look for and open the page so i dont have to have index2.php and index3.php with all the same info (tables, backgrounds, graphics) |
|
#10
|
||||
|
||||
|
>>include( "people/$person");
bad bad bad idea to include in that way without checking var
__________________
And you know I mean that. |
|
#11
|
|||
|
|||
|
well i have no background with PhP yet
and i dont know what you mean by that why is it "person" i dont understand why isnt it "link" or something else like that |
|
#12
|
|||
|
|||
|
the idea is to use a meaningful variable name. you have your index page, then in a subdirectory somewhere you have a bunch of files, one for each person on the list. then your links will pass that variable as a unique identifier that you can use to include the correct file.
|
|
#13
|
|||
|
|||
|
and ya, be sure to provide a default to display if the variable hasn't been set. php is pretty easy, especially if you have experience with another C-syntax language (java, javascript, C++).
do something like: <? if ($page_to_display) { include( "path/to/$page_to_display"); } else { ?> <p>some html to display</p> <? } ?> |
|
#14
|
|||
|
|||
|
ok
but this "<a href="<?=$PHP_SELF?>?person=SRT.God">SRT.God</a> " does the <$php_self?> mean to open it up in a new window??? when i want it to open in a table??? and ok so i use ?person when i want to open one of my members profiles??? can i have 2 inlcudes in my middle frame?? "include( "people/$person"); " this code goes in my middle frame right? can i have another inlcude that says ("links/$link"); to use with my other link box? |
|
#15
|
|||
|
|||
|
$PHP_SELF is an internal php variable which basically means "current page". so it's just reloading the current page with a different query string. you put the <?include();?> in your html wherever you want the output to show up. it's the same thing as ssi. instead of writing the html in your php script and having a bunch of php scripts, you have one script that loads one section of its contents from a different file based on what variable you give it.
as to different includes, knock yourself out. since you've got the same navigation features on all your pages, you could your nav in one file and just include that. you can put your header and footer each in seperate files and include them on every page. it really makes life easier not to have to change every single page when you made a typo in your copywrite ![]() |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > including pages without SSI |
| Thread Tools | Search this Thread |