php não está funcionando (arquivo de origem)

1

Eu não sei porque o php não está funcionando.

Eu instalo o Nginx e o php

  server {

  listen       80;
  server_name  t.com t.com;
  location ~ \.php$  {
   fastcgi_split_path_info ^(.+\.php)(/.+)$;
    root   /var/www/t.com/public_html/;
    index  index.html index.htm;
    try_files $uri $uri/ =404;
    }    error_page   500 502 503 504  /50x.html;
  location = /50x.html {
    root   html;
  }

}

e php.conf

#s
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
<IfModule prefork.c>
LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so
</IfModule>
<IfModule worker.c>
  LoadModule php5_module modules/libphp5-zts.so
</IfModule>

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php
AddType application/x-httpd-php  .php
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps
<FilesMatch \.php$>
    SetHandler application/x-httpd-php
</FilesMatch>

and when browser  file  , show  download file
    
por Hussien Mhdi 03.08.2016 / 13:54

1 resposta

2

Seu arquivo p.php precisa começar com:

<?php

e não

<?
    
por 03.08.2016 / 14:29

Tags