MVC jak to ugryźć |
MVC jak to ugryźć |
21.01.2019, 20:35:43
Post
#1
|
|
Grupa: Zarejestrowani Postów: 54 Pomógł: 0 Dołączył: 26.10.2008 Ostrzeżenie: (0%) |
Na początek pokażę pliki
index.php
Controller.php
Loader.php
Plik index.php z katalogu application
Zawartość pliku main.php
Moje pytanie brzmi jak podmienić w pliku main.php {B} na zawartość pliku Test.php, próbuję na wszystkie sposoby i przez str_replace i przez przeg_replace i za każdym razem wychodzi jakiś błąd, między innym Catchable fatal error: Object of class Loader could not be converted to string in, proszę o pomoc. |
|
|
21.01.2019, 21:09:11
Post
#2
|
|
Grupa: Zarejestrowani Postów: 1 863 Pomógł: 228 Dołączył: 20.03.2005 Skąd: Będzin Ostrzeżenie: (0%) |
|
|
|
21.01.2019, 21:45:24
Post
#3
|
|
Grupa: Zarejestrowani Postów: 54 Pomógł: 0 Dołączył: 26.10.2008 Ostrzeżenie: (0%) |
Tylko proszę powiedz jak ją podpiąć, bo zielonego pojęcia nie mam
|
|
|
21.01.2019, 21:52:14
Post
#4
|
|
Grupa: Zarejestrowani Postów: 8 068 Pomógł: 1414 Dołączył: 26.10.2005 Ostrzeżenie: (0%) |
@Gibcio2008 a co ty chcesz zrobić? Bo mnie się wydaje że ten Twój loader to raczej zamiast file_get_contents powinien mieć po prostu `require_once`
|
|
|
21.01.2019, 22:03:10
Post
#5
|
|
Grupa: Zarejestrowani Postów: 54 Pomógł: 0 Dołączył: 26.10.2008 Ostrzeżenie: (0%) |
Chodzi mi głównie o to żeby z tablicy w Pliku index.php z katalogu application
Wartości wprowadzić w pliku main.php za odpowiednie znaczniki np. [B] lub {B} - żeby była zawartość z $this->loader->GetFile("template/Test.php")
|
|
|
22.01.2019, 01:01:07
Post
#6
|
|
Grupa: Zarejestrowani Postów: 2 707 Pomógł: 290 Dołączył: 16.12.2008 Skąd: Śląsk Ostrzeżenie: (0%) |
-------------------- |
|
|
22.01.2019, 06:51:43
Post
#7
|
|
Grupa: Zarejestrowani Postów: 1 863 Pomógł: 228 Dołączył: 20.03.2005 Skąd: Będzin Ostrzeżenie: (0%) |
No nie wiem w czym problem, skoro na stronie jest nawet przykład użycia:
|
|
|
22.01.2019, 12:24:46
Post
#8
|
|
Grupa: Zarejestrowani Postów: 54 Pomógł: 0 Dołączył: 26.10.2008 Ostrzeżenie: (0%) |
Poradziłem sobie wystarczyło pobawić się w buforowanie
|
|
|
Wersja Lo-Fi | Aktualny czas: 26.09.2024 - 06:11 |