Jump to content

read php-file with the browser from local host


Pavlin24

Recommended Posts

Hallo,

Can anybody help for this question.

I have changed my computer. And now my browser (google chrome) can not read php-files from my computer.

I have installed PHP from XAMPP.

What may be the reason for this?

Link to comment
Share on other sites

If you have XAMPP installed, when you turn it on, the files that are inside the htdocs directory of your XAMPP installation will be accessible through the localhost domain in the browser, like this: http://localhost/file.php

It might be that you had a Chrome extension that creates a local server like this one: https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb?hl=en Just like XAMPP, the Chrome extension requires the files to be in a particular folder and accessed through a particular domain (127.0.0.1:8000)

Link to comment
Share on other sites

Your code editor should save the file with a UTF-8 encoding and your HTML page should specify that encoding using a <meta charset="UTF-8"> tag.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...