Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: VSCode, Liveserver and Chrome Date: Mon, 19 Aug 2019 06:53:48 +0200 Lines: 43 Message-ID: References: <5jojlehmnk4vone4l6k9mv56akrfjrv0rc@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net jxtBW0WbZYH3FEhZQPF+ZQNpkpm8MFUXImZXJUPSmWf1WrAwiG Cancel-Lock: sha1:rdIvVuKzrttj5nU0KccKHcgtQsw= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 In-Reply-To: Content-Language: en-US-large Xref: csiph.com comp.lang.php:18037 On 19/08/2019 04.49, Jerry Stuckle wrote: > On 8/18/2019 7:43 PM, Call Me Tom wrote: >>   wrote: >> >>> Call Me Tom wrote: >>> >>>> I'm using VS Code for creating my PHP files.  I'm trying to get >>>> liveserver to work with PHP files.It works fine with an HTML file.  I >>>> have installed the live server extension in chrome and the live reload >>>> button is on.  When I go live in VSC all I get in Chrome is a >>>> directory listing. I am using a default XAMPP installation. First of all, I'm not a XAMPP user, I prefer a OS that comes with simple install all php/mariadb/apache. >>>> What is the actual server address that should be entered in Chrome? >>>> Any other suggestions would be appreciated. >>> >>> Apparently, some variation of http://localhost/ or http://127.0.0.1/ >>> >>> At least, according to the XAMPP FAQ >> >> Thanks Lew.  I tried both of those and all I get is a directory >> listing. >> > > You get a directory listing if you just request a directory and do not > have a default home page (often index.html) in that directory. At least in the world most used OS, apache comes with a default configuration which enables index.php as a default page if the php module is loaded (-D PHP). > This is an Apache configuration problem and has nothing to do with PHP. Could be that the OP just don't have a index.php but say default.php as the starting point of his site in which case the error should be between the keyboard and the chair. -- //Aho