Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript][CSS][PHP]Przyjazne linki - nie widzi plików css i js
stepien
post
Post #1





Grupa: Zarejestrowani
Postów: 23
Pomógł: 0
Dołączył: 19.07.2015

Ostrzeżenie: (0%)
-----


Witam.

Pisze stronę internetową i mam taki problem

htaccess

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]

Klasa root

<?php

class root {

public $class;
public $action;
public $params;


public function __construct() {

$routParts = explode("/", $_GET['url']);

$this->controller = 'c'.$routParts[0];
$this->action = isset($routParts[1]) ? $routParts[1] : "index";

array_shift($routParts);
array_shift($routParts);

$this->params = $routParts;;
}

public function run(){

$sys = new $this->controller();
$sys->{$this->action}($this->params);
}
}

?>


Linki:


news i news/add

Przy pliku new widziane są jc i css
Natomiast jak klikam news/add to nie dziwidzi js i css.
Jak to rozwiązać ten problem?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.12.2025 - 18:03