0

I've started to learn about dynamic web pages so I dont know much about web servers or php or anything that's related to web. So I've installed XAMPP (to opt/lampp as default),and I want to test my first ever php script, but I don't know where to save it, because if I save it simply in opt/lampp it says object now found in the browser.enter image description here Where do I need to save my php scripts in the server to be able to run them in the browser? Thank.

5
  • 1
    answers.yahoo.com/question/index?qid=20110801180827AASy4Az Commented Mar 6, 2015 at 14:22
  • 3
    Everyone's a web developer nowadays huh? Search for htdocs folder, put your stuff inside. Commented Mar 6, 2015 at 14:23
  • figure out where your apache install's document root is. you can't just stuff your scripts into random spots on the server and expect apache to be able to find them. Commented Mar 6, 2015 at 14:25
  • yes I know,like I said I'm new to web things so I'm asking for advice,But anyways @Jordy thanks I think that solved my problem. Commented Mar 6, 2015 at 14:27
  • @BsD Doesn't matter, just try to google your issue next time. I searched for "Root folder XAMPP" and found lots of results :) Commented Mar 6, 2015 at 14:28

1 Answer 1

1

You should save them under www/

Example under www/ you have a file called test.php the correct url should be localhost/test.php

Another under www/ you have a folder called test_folder that contains a file called my1script.php

the correct url should be localhost/test_folder/my1script.php

Sign up to request clarification or add additional context in comments.

1 Comment

In XAMP the correct folder is actually htdocs. I think you're confusing it with WAMP which DOES use the www folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.