Jump to content
Sign in to follow this  
Pavlin24

read php-file with the browser from local host

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?

Share this post


Link to post
Share on other sites

You have to use the localhost domain to run PHP. Opening the PHP file directly will not work.

Share this post


Link to post
Share on other sites

Excuse me, but how I must use the localhost.

On the old PC I did not do anything special. It worked directly.

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

Yes. Thank you Ingolme. Now it works. But other problem. With encoding. I wrote text with cyrillic letters and it shows like this - ???????.

Pls see the attachment.

Doc1.docx

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Do you think it is possible newbie like me to find a job from distance as web designer?

Share this post


Link to post
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
Sign in to follow this  

×