Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
The first gets an error:
Index of /
Icon Name Last modified Size Description[ ] listing6-1.php 16-Jan-2002 04:29 3.1K
Apache/2.0.59 (Unix) PHP/5.2.1 DAV/2 mod_ssl/2.0.59 OpenSSL/0.9.7l Server at 127.0.0.1 Port 8888
The second works, sort of, except that it doesn't seem to actually work work, but at least it gets a screen like it should!
htdocs isn't usually in a URL, but is rather the root of the directory that the web server points to.
That message isn't an error--it's a directory listing.
Excellent. htdocs is the folder name Apache uses for web documents -- you'll want to put all the files you make in there. Of course, they shoulda documented it better!
(Oh, and the first wasn't an error -- it's just that ugly file listing you get when there's no index page)
That's weird -- when I click on ita's link (which reads
http: //127.0.0.1:8888/listing6-1.php
), it will open the PHP correctly. But if I open a new tab or window, it won't find anything.
So the only place PHP code can live is in the htdocs directory if I'm going to run PHP, right?
Sorry to be taking up so much of this topic. You guys are my lifeline. Also, I get really impatient when a techy thing that should work doesn't and everything I can think of to throw at it doesn't make even the slightest bit of difference.
Any file you want served up (PHP, HTML, whatever) should be under htdocs in the directory structure. You can do some stuff to map to other directories outside the tree, but it'd just be one more confusing thing to go wrong.
For your current purposes, the only place anything non-database lives is htdocs.
Good! And I found out there was an extra space in the URL I was pasting into the command, so that explains that!
My sanity, she is saved. Well, what little sanity I have is preserved. You know what I mean.
Thanks again!
And I found out there was an extra space in the URL I was pasting into the command, so that explains that!
D'oh! My bad - I stuck the space in so you could see the URL rather than letting it be auto-linkified by the b.org.
Good luck!