简体   繁体   中英

Why can't my browser see my hosted php files?

I'm sure I'm doing something dumb, but I can't tell what it is.

On my remote host, I have a subdir with a bunch of files. When I request this directory, I can see a listing of the files within this dir.

However, if request any file suffixed .php, my browser says that the resource is not available. Firefox tells me that it can't find the file I requested.

I guess that this is a permissions issue. For testing purposes, I have set the permissions as permissively as possible.

What could be causing this?

Resource not available (HTTP 503) depends a lot on your server configuration. If you are using a FastCGI version of PHP, have you started the FastCGI backend? If you are using Apache and mod_php, are there errors in the Apache logs?

What web server are you using? Has it been able to serve PHP files before?

if apache, make sure you have something similar to this in your config:

<IfModule mod_php5.c>
AddType application/x-httpd-php .php
</IfModule>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM