Jump to content
php.lv forumi

Nezinu kā to var uztaisīt?


armins77

Recommended Posts

if(isset($_GET['page'])){
$lapa = "/lapas/".$_GET['page'].".php";
if(file_exists($lapa)){ include_once($lapa); }
}else{
echo "default_lapa";
}

 

Chizijs tev jau visu parādīja priekšā. Uztaisi folderi lapas un viņā ieliec iekšā lapa.php ark autkādu saturu, tad ieej savā idex failā ar savu linku un viss ies

Link to comment
Share on other sites

Ieliec visus savus jaunuma kodus iekš news.php un viņu vietā liec šo kodu

<?php
if(isset($_GET['page'])){
$lapa = "/page/".$_GET['page'].".php";
if(file_exists($lapa)){ include_once($lapa); }
}else{
include_once("news.php");
}
?>

Edited by chizijs
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...