• Новые темы в этом разделе публикуются автоматически при добавлении файла в менеджер ресурсов.
    Ручное создание новых тем невозможно.
Иконка ресурса

Мануал Любая версия Php и короткие тэги.

Красная Королева

Путник
Модератор
Сообщения
461
Розыгрыши
0
Репутация
141
Реакции
28
Баллы
0
Если при открытии php скриптов у Вас открывается страничка в виде текста то:
1.Вы забыли установить php - apt-get install php5
2.Или в Вашем скрипте используются короткие тэги
Код:Значит при этом функция коротких тэгов отключена в php.ini по пути /etc/php5/apache2
Код:; This directive determines whether or not PHP will recognize code between ; tags as PHP source which should be processed as such. It's been ; recommended for several years that you not use the short tag "short cut" and ; instead to use the full tag combination. With the wide spread use ; of XML and use of these tags by other languages, the server can become easily ; confused and end up parsing the wrong code in the wrong context. But because ; this short cut has been a feature for such a long time, it's currently still ; supported for backwards compatibility, but we recommend you don't use them. ; Default Value: On ; Development Value: Off ; Production Value: Off ; short_open_tag = OffВключите :
Код:; This directive determines whether or not PHP will recognize code between ; tags as PHP source which should be processed as such. It's been ; recommended for several years that you not use the short tag "short cut" and ; instead to use the full tag combination. With the wide spread use ; of XML and use of these tags by other languages, the server can become easily ; confused and end up parsing the wrong code in the wrong context. But because ; this short cut has been a feature for such a long time, it's currently still ; supported for backwards compatibility, but we recommend you don't use them. ; Default Value: On ; Development Value: Off ; Production Value: Off ; short_open_tag = Onи перезапустите апач командой: apache2ctl restart
Или так: /etc/init.d/apache2 reload
3.Или просто пишем код так:
Код:p.S.
Если используете Убунту , то перед командами пишем : sudoПолезно . Бесплатный . Смена апачу. Работа с . Образ , Уроки по .
 

Назад
Сверху Снизу