Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [ocena]druga odslona, w45
E-d
post
Post #1





Grupa: Zarejestrowani
Postów: 57
Pomógł: 0
Dołączył: 9.04.2005

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


Prosił bym o ocenej, drugiej odsłony mojej strony. Teraz stawiałem na lekkość, prostote kodu itp....
Strona zgadza się z html 4.01 i css

http://w45.info


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





Grupa: Zarejestrowani
Postów: 191
Pomógł: 0
Dołączył: 16.05.2003
Skąd: POLAND

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


Niewiele sie nauczyles:
http://w45.info/w45/index.php?act=pliki&ak...komentarze&id=0

Cytat
Warning: file(pli/komentarze/0.txt): failed to open stream: No such file or directory in /home/w45fasto/public_html/w45/page/pliki.php on line 106

Warning: fopen(pli/komentarze/0.txt): failed to open stream: No such file or directory in /home/w45fasto/public_html/w45/page/pliki.php on line 119

Warning: filesize(): Stat failed for pli/komentarze/0.txt (errno=2 - No such file or directory) in /home/w45fasto/public_html/w45/page/pliki.php on line 120

Warning: fread(): supplied argument is not a valid stream resource in /home/w45fasto/public_html/w45/page/pliki.php on line 120

Warning: rewind(): supplied argument is not a valid stream resource in /home/w45fasto/public_html/w45/page/pliki.php on line 121

Warning: flock(): supplied argument is not a valid stream resource in /home/w45fasto/public_html/w45/page/pliki.php on line 122

Warning: fwrite(): supplied argument is not a valid stream resource in /home/w45fasto/public_html/w45/page/pliki.php on line 123

Warning: flock(): supplied argument is not a valid stream resource in /home/w45fasto/public_html/w45/page/pliki.php on line 124

Warning: fclose(): supplied argument is not a valid stream resource in /home/w45fasto/public_html/w45/page/pliki.php on line 125

Przeanalizuj to dokladniej:
http://forum.php.pl/index.php?showtopic=28...ndpost&p=166114


--------------------
Go to the top of the page
+Quote Post
hwao
post
Post #3


Developer


Grupa: Moderatorzy
Postów: 2 844
Pomógł: 20
Dołączył: 25.11.2003
Skąd: Olkusz




Cytat
Czy php zadziała na stronie z rozszerzeniem .htm/.html ?
Nie, żeby php działało musi być rozszerzenie .php lub .php3

nie zgodze sie
Cytat
Co to jest php i co oznacza ?
Jest to język do robienia stron, wykonywany po stronie serwera. Samo php oznacza: Hypertext Preprocessor

tak samo sie nie zgadzam
Go to the top of the page
+Quote Post
AxZx
post
Post #4





Grupa: Zarejestrowani
Postów: 1 385
Pomógł: 55
Dołączył: 1.03.2005
Skąd: śląsk

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


tekst z tej strony:

Cytat
Jeżeli wstawiamy na naszej stronie coś przez include(), to można to odpowiednio zabezpieczyć, żeby nikt nie mógł zobaczyć includowane pliku, tylko na stronie na której jest includowany. Wpierw na stronie na której będzie include():
<? defined("w45") or die("Brak dostępu"); ?>
I teraz w każdym pliku który będziemy includować:
<? defined("w45"); ?>
Dzięki temu nikt nie wejdzie na includowane strony


i niby jak to ma dzialac jak nie dziala ?


--------------------
aplikacje internetowe | Symfony
Go to the top of the page
+Quote Post
hwao
post
Post #5


Developer


Grupa: Moderatorzy
Postów: 2 844
Pomógł: 20
Dołączył: 25.11.2003
Skąd: Olkusz




  1. <?php // index.php
  2. define( 'hwao', 'yeah' );
  3. include( 'plik.php' );
  4. ?>

  1. <?php //plik.php
  2. if ( defined('hwao') ) die( 'Ten plik mozna tylko zalanczac:)' );
  3.  
  4. echo 'a tego nie widzi nie zalaczona:)';
  5.  
  6. ?>


Cytat
This can be useful if you want to protect pages which get included from outsiders eyes, on your mail page (the page viewable by people) put define("X", null); then on all your other pages, you can then do something like:


  1. <?php
  2. if (!defined(&#092;"X\")) {
  3.  echo &#092;"You Cannot Access This Script Directly, Have a Nice Day.\";
  4.  exit();
  5. }
  6. ?>


Cytat
And your page is a good as protected smile.gif
Go to the top of the page
+Quote Post
Strus
post
Post #6





Grupa: Zarejestrowani
Postów: 184
Pomógł: 0
Dołączył: 19.01.2005
Skąd: Bochnia

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


Ja robię podobnie, na to samo wychodzi, ale jest krócej smile.gif
W index.php:
  1. <?php
  2. $view=true;
  3. ?>


W plikach includowanych
  1. <?php
  2. if(!view)exit;
  3. ?>


smile.gif


--------------------
Go to the top of the page
+Quote Post
MaKARON
post
Post #7





Grupa: Zarejestrowani
Postów: 114
Pomógł: 1
Dołączył: 17.07.2003

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


to teraz musisz miec nadzieje ze

register_globals = Off

smile.gif

z Tego wlasnie powodu wygodniejsze jest include.
A do zabezpieczenia plikow - proponuje uzywac katalogow nie dostepnych bezposrednio przez URL (znajdujacych sie ponizej DocumentRoot.
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 20.08.2025 - 01:55