Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Probrem w załadowaniu grafiki w skrypcie php
kubakuba
post
Post #1





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 18.01.2011

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


Mam problem przy załadowaniu grafiki jpg.
Mam zainstalowany server vertrigo a grafikę w katalogu.
C:\Program Files\VertrigoServ\www\kurs_dzienny\php\rozdzial_03\ob

Tak wygląda mój skrypt:

  1. <?php
  2. $obrazki = array('disel.jpg', 'felga.jpg', 'narzedzia.jpg',
  3. 'obraz.jpg');
  4.  
  5. shuffle($obrazki);
  6. ?>
  7. <html>
  8. <head>
  9. <title>Części samochodowe Janka</title>
  10. </head>
  11. <body>
  12. <center>
  13. <h1>Części samochodowe Janka</h1>
  14. <table width = '100%'>
  15. <tr>
  16. <?php
  17. for ( $i = 0; $i < 3; $i++ )
  18. {
  19. echo '<td align="center"><img src="php\rozdzial_03\ob';
  20. echo $obrazki[$i];
  21. echo 'width="100" height="100"></td>';
  22. }
  23. ?>
  24. </tr>
  25. </table>
  26. </center>
  27. </body>
  28. </html>
  1. [/PHP]
  2. [PHP]
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
kubakuba
post
Post #2





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 18.01.2011

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


Ścieżka do pliku hosts

E:\WINDOWS\system32\drivers\etc

W pliku hosts dodałem taki wpis:

  1. 127.0.0.1 Kurs



Ząś katalog z Wampserwerem ma zainstalowany w katalogu:
C:\wamp

katalog kurs jest w
  1. C:\wamp\www\kurs


do pliku "httpd. conf" dodałem przy edycji taki wpis w ostatnich linijkach:


  1. NameVirtualHost 127.0.0.1:80
  2. <VirtualHost 127.0.0.1:80>
  3. ServerAdmin webmaster@domain
  4. DocumentRoot "C:/wamp/www"
  5. ServerName localhost
  6. ServerAlias localhost www.localhost
  7. #ErrorLog "logs/noname-error.log"
  8. #CustomLog "logs/noname-access.log" common
  9. </VirtualHost>
  10. <VirtualHost 127.0.0.1:80>
  11. ServerAdmin webmaster@domain
  12. DocumentRoot "C:/wamp/www/kurs"
  13.  
  14. ServerName kurs
  15. ServerAlias vhost www.whost
  16. #ErrorLog "logs/kurs/noname-error.log"
  17. #CustomLog "logs/kurs/noname-access.log" common
  18. </VirtualHost>


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: 5.10.2025 - 07:51