eT` Posted January 27, 2012 Report Share Posted January 27, 2012 Mēģinu fancybox'ā ielādēt PHP failu, kurš atkarībā no URL attēlotu informāciju. Lappušu ielādēšana <?php $p = explode('/',$_SERVER['REQUEST_URI']); if($p[1] == '') $p[1] = 'index'; $neattelot = array('getinfo'); if(in_array($p[1],$neattelot)) { include_once('pages/'.$p[1].'.php');// sho vajag dažām lapām bez headeriem etc. } else { visa lapas HTML daļa... $("a.upp").fancybox({ 'transitionIn' : 'elastic', 'transitionOut' : 'elastic', 'speedIn' : 600, 'speedOut' : 200, 'overlayShow' : false }); <a class="upp" href="http://manalapa.lv/getinfo/a">CLICK ME</a> } ?> un /pages/getinfo.php <?php if(isset($p[2])) { switch($p[2]) { case 'a': echo '...'; break; case 'b': echo '...'; break; case 'c': echo '...'; break; } } ?> bet FancyBox parāda - The requested content cannot be loaded. Please try again later. Quote Link to comment Share on other sites More sharing options...
0 vertex Posted January 28, 2012 Report Share Posted January 28, 2012 (edited) [color=#000000]include_once[/color][color=#666600]([/color][color=#008800]'pages/'[/color][color=#666600].[/color][color=#000000]$p[/color][color=#666600][[/color][color=#006666]1[/color][color=#666600]].[/color][color=#008800]'.php'[/color][color=#666600]);[/color][color=#880000]// sho vajag dažām lapām bez headeriem etc.[/color] Pamēģini uzlikt, lai viņš ņem pēc pilnās, t.i. no root foldera. Edited January 28, 2012 by vertex Quote Link to comment Share on other sites More sharing options...
Question
eT`
Mēģinu fancybox'ā ielādēt PHP failu, kurš atkarībā no URL attēlotu informāciju.
Lappušu ielādēšana
un /pages/getinfo.php
bet FancyBox parāda - The requested content cannot be loaded. Please try again later.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.