Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Jak skrócić adres
frani0
post
Post #1





Grupa: Zarejestrowani
Postów: 43
Pomógł: 5
Dołączył: 9.03.2011

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


Robię tak
  1. $base = dirname(__FILE__)."..\\..\\..\\";
  2. $front = "apps\\frontend\\modules\\";
  3.  
  4. $adres=$base.$frony."strona.php";


W efekcie otrzymuję funkcjonalny ale nie ładny adres gduż zawiera ciąg typu "..\..\..\" Jak zrobić?

w skórcie chciałbym zamienić to:
  1. C:\xampp\htdocs\SDOK\lib\control..\..\..\apps\frontend\modules\strona.php

na to
  1. C:\xampp\htdocs\SDOK\apps\frontend\modules\strona.php

Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




http://pl.php.net/manual/en/function.realpath.php
Go to the top of the page
+Quote Post
frani0
post
Post #3





Grupa: Zarejestrowani
Postów: 43
Pomógł: 5
Dołączył: 9.03.2011

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


Dziękuje o to chodziło
Go to the top of the page
+Quote Post

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.08.2025 - 12:19