MrPencil
MrPencil

Reputation: 964

Can not access the php file within the htdocs directory

I have the test.php file in this directory C:\xampp\htdocs. I can access the localhost by this link http://localhost:800/xampp/ then it appears the orange XAMPP wlecome window but when I type the following URL http://localhost:800/xampp/test.php I getting something as The required URL could not be found. Why can not I access this file?

Apache ports: 800, 4433

MySQL ports: 3306

test.php

<?php
echo "Hello World!";
?>

Upvotes: 1

Views: 4439

Answers (2)

Florian
Florian

Reputation: 727

If you file is in C:\xampp\htdocs you should access it using http://localhost:800/test.php.

htdocs is the default root directory of apache. (Variable DocumentRoot in conf/httpd.conf)

Upvotes: 1

Max
Max

Reputation: 701

  • 1) Inside the htdocs directory crate new folder test and add file test.php into this directory
  • 2) Restart the server
  • 3) Use http://localhost/test/test.php

Upvotes: 0

Related Questions