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.
Where do I need to save my php scripts in the server to be able to run them in the browser?
Thank.
-
1answers.yahoo.com/question/index?qid=20110801180827AASy4AzJordy– Jordy2015-03-06 14:22:52 +00:00Commented Mar 6, 2015 at 14:22
-
3Everyone's a web developer nowadays huh? Search for htdocs folder, put your stuff inside.trainoasis– trainoasis2015-03-06 14:23:44 +00:00Commented 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.Marc B– Marc B2015-03-06 14:25:27 +00:00Commented 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.lychee– lychee2015-03-06 14:27:08 +00:00Commented 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 :)Jordy– Jordy2015-03-06 14:28:44 +00:00Commented Mar 6, 2015 at 14:28
Add a comment
|
1 Answer
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
1 Comment
winseybash
In XAMP the correct folder is actually
htdocs. I think you're confusing it with WAMP which DOES use the www folder.