Jump to content
php.lv forumi

sadaļu "sistēma"


vitao.web

Recommended Posts

Labdien!

 

Ceru, ka spēsiet man kaut kā palīdzēt!

 

Tātad ir sekojošas lietas:

$includes:

$includes = array(
       'home' => 'content/main.php',
       'news' => 'content/news.php',
       'events' => 'content/events.php',
       'gallery' => 'content/gallery.php', 
       'about' => 'content/about.php', 
       'staff' => 'content/staff.php', 
       'links' => 'content/links.php', 
	'contact' => 'content/contact.php',
	'readmore'=> 'content/readmore.php',
   );

 

Tad ar šo lietu es viņas izvelku:

<?php 
if (isset($cat) && isset($includes["$cat"])) {
   if(!@include($includes["$cat"])) {
       require('content/main.php');
   } 
} else {
   require('content/main.php');
}
?>

 

Adreses ir:

?cat=news uttt

 

Viss strādā kedā, līdz brīdim, kad vēlos izdabūt readmmore.php..

1.orginals, ka tagad ir
<a class='link' title='".$rez['title']."' href=readmore.php?id=".$rez['id']."&cat=".$rez['cat'].">
2. variants ka meginaju (nestrada)
<a class='link' title='".$rez['title']."' href=?cat=readmore?id=".$rez['id']."&cat=".$rez['cat'].">

 

Tad lūk cerēju, ka ieteiksiet, kur kļuda vai arī kā sataisīt šo lietu, ko vēlos.

 

 

 

Paldies!

 

ar cieņu,

vitao.web

Link to comment
Share on other sites

Tak debugo, mēs minot, par tevi ātrāk problēmu neatradīsim.

<?php 
echo 'cat='.$cat;
if (isset($cat) && isset($includes["$cat"])) {echo 1;
   if(!@include($includes["$cat"])) {echo 2;
       require('content/main.php');
   } 
} else {echo 3;
   require('content/main.php');
}
?>

Tāda raķešu zinātne!!!111

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...