2

I'm almost finished my first website. All that's left is the contact which I will do with PHP. So far I have been using Brackets for coding HTML5 and CSS.

From my research I understand that I need a server to run PHP so I installed XAMPP. I have relocated my project inside the htdocs folder of XAMPP, however when I try to open up my PHP page in Brackets' live preview I get this.

Peter Gordon
  • 1,075
  • 1
  • 18
  • 38
Oliver
  • 33
  • 1
  • 10
  • Try with change url in browser localhost/JavaScript/contact.php u need to give exact location of your file i think it is in javascript folder which is store in htdocs... it is work htdocs = localhost then add foldername and add file name separate with slash(/) – Maninderpreet Singh Jun 21 '16 at 16:50
  • Not anything to do with your question, but your email regex is filtering out lots of emails. Just thought you should know. Top level domains are not restricted to 2-4 letters. And some even have dots or dashes in them. For example `.co.uk`. Also an IP can be the domain. – Andreas Jun 21 '16 at 16:52
  • Do you see xampp configuration panel if you go to http://localhost? – phaberest Jun 21 '16 at 16:53
  • you should put the file in the document root of your xampp ( you can also change the document root ) follow these steps http://stackoverflow.com/questions/8847392/how-to-change-xampp-localhost-to-another-folder-outside-xampp-folder – Lorence Hernandez Jun 21 '16 at 16:56

1 Answers1

1

Found out whats wrong, I had to go to project settings in brackets and adjust the directory to match the location of the project inside the xampp directory.

Oliver
  • 33
  • 1
  • 10
  • I was about to comment about that but I guess you already figured it out... good luck with your project, and keep Brackets, it's awesome! – Zeke Jun 21 '16 at 17:04
  • @Zeke sounds like you are a bracket user I'd like to ask you some questions about php and brackets however there isn't any way to private message on stack exchange, Can you share your email? Or could you email me at info@primitivecreations.tv? – Oliver Jun 21 '16 at 18:43
  • Sure thing, I'll send you an email. – Zeke Jun 21 '16 at 18:44