Thread View: pl.comp.www.server-side
4 messages
4 total messages
Started by Jivanmukta
Thu, 30 Oct 2014 07:27
Notice z pliku .php pomimo modyfikacji
Author: Jivanmukta
Date: Thu, 30 Oct 2014 07:27
Date: Thu, 30 Oct 2014 07:27
16 lines
1599 bytes
1599 bytes
W pliku localhost_constants.php miałem:
<?php
if (strtolower(substr(PHP_OS, 0, 3)) == 'win') {
$user = ($_ENV['COMPUTERNAME'] == 'ANDRZEJ-PC' ? 'Rpbert' : 'Robert');
} else {
$user = 'robert';
}
i wyświetliło mi się:
Notice: Undefined index: COMPUTERNAME in C:\Program Files\xampp\xampp\htdocs\rozgloszenia\application\config\localhost_constants.php on line 3
Zmieniłem wiersz 3 na:
$user = 'Robert';
zapisalem plik .php i mam nadal Notice. Przebootowanie komputera nie pomaga.
Re: Notice z pliku .php pomimo modyfikacji
Author: Krzychu
Date: Thu, 30 Oct 2014 08:29
Date: Thu, 30 Oct 2014 08:29
4 lines
1182 bytes
1182 bytes
On 10/30/14 08:27, Jivanmukta wrote:
> $user = ($_ENV['COMPUTERNAME'] == 'ANDRZEJ-PC' ? 'Rpbert' : 'Robert');
$user=((array_key_exists('COMPUTERNAME',$_ENV)&&$_ENV['COMPUTERNAME']=='ANDRZEJ-PC')?'Rpbert':'Robert');
Re: Notice z pliku .php pomimo modyfikacji
Author: Jivanmukta
Date: Thu, 30 Oct 2014 13:12
Date: Thu, 30 Oct 2014 13:12
1 lines
1576 bytes
1576 bytes
Dzieki, ale moj problem polega na tym, ze nie sa widoczne zmiany, ktore wprowadzam do pliku .php. Dlatego napisalem na server-side, a nie na pl.comp.lang.php.
Re: Notice z pliku .php pomimo modyfikacji
Author: Jivanmukta
Date: Thu, 30 Oct 2014 13:17
Date: Thu, 30 Oct 2014 13:17
1 lines
1598 bytes
1598 bytes
Aplikacja jest w katalogu "C:\Program Files\xampp\xampp\htdocs\rozgloszenia", uruchamiam jÄ… przez http://localhost/rozgloszenia. Nie mam na komputerze drugiego katalogu o takiej nazwie.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads