test.loc - PHP Online
Form of PHP Sandbox
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of test.loc.php
- #
- # Virtual Hosts
- #
- # If you want to maintain multiple domains/hostnames on your
- # machine you can setup VirtualHost containers for them. Most configurations
- # use only name-based virtual hosts so the server doesn't need to worry about
- # IP addresses. This is indicated by the asterisks in the directives below.
- #
- # Please see the documentation at
- # <URL:http://httpd.apache.org/docs/2.2/vhosts/>
- # for further details before you try to setup virtual hosts.
- #
- # You may use the command line option '-S' to verify your virtual host
- # configuration.
- #
- # Use name-based virtual hosting.
- #
- ##NameVirtualHost *:80
- #
- # VirtualHost example:
- # Almost any Apache directive may go into a VirtualHost container.
- # The first VirtualHost section is used for all requests that do not
- # match a ServerName or ServerAlias in any <VirtualHost> block.
- #
- ##<VirtualHost *:80>
- ##ServerAdmin [email protected]
- ##DocumentRoot "C:/xampp/htdocs/dummy-host.localhost"
- ##ServerName dummy-host.localhost
- ##ServerAlias www.dummy-host.localhost
- ##ErrorLog "logs/dummy-host.localhost-error.log"
- ##CustomLog "logs/dummy-host.localhost-access.log" combined
- ##</VirtualHost>
- <VirtualHost *:80>
- ServerAdmin postmaster@test.loc
- DocumentRoot "C:/xampp/htdocs/test.loc"
- ServerName test.loc
- ServerAlias www.test.loc
- ErrorLog "logs/dummy-host2.localhost-error.log"
- CustomLog "logs/dummy-host2.localhost-access.log" combined
- </VirtualHost>