PHP Files and Webpages |
![]() ![]() |
PHP Files and Webpages |
Mar 26 2007, 08:03 PM
Post
#1
|
|
![]() talent on another level ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 746 Joined: Oct 2006 Member No: 475,735 |
So I finished all the webpages for my website in Dreamweaver. All of them right now are saved as .htm files. I am using CuteNews, so would it be best to save them as .php files?
|
|
|
|
| *mipadi* |
Mar 26 2007, 08:41 PM
Post
#2
|
|
Guest |
Only if they're PHP files.
|
|
|
|
Mar 26 2007, 08:45 PM
Post
#3
|
|
![]() talent on another level ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 746 Joined: Oct 2006 Member No: 475,735 |
what did you mean by that?
|
|
|
|
| *mipadi* |
Mar 26 2007, 09:00 PM
Post
#4
|
|
Guest |
Well, they should only have a .php extension if they are actually PHP scripts.
|
|
|
|
Mar 27 2007, 04:54 AM
Post
#5
|
|
![]() talent on another level ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 746 Joined: Oct 2006 Member No: 475,735 |
well none of my .htm files have scripts on them. your gonna have to explain a little better, cause it doesnt make since right now what your saying? sorry
|
|
|
|
| *mipadi* |
Mar 27 2007, 07:36 AM
Post
#6
|
|
Guest |
A .php file is generally a webpage that mixes in at least a little PHP scripting. If your webpages don't use PHP, then they shouldn't be .php files.
|
|
|
|
Mar 27 2007, 02:27 PM
Post
#7
|
|
![]() talent on another level ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 746 Joined: Oct 2006 Member No: 475,735 |
l0l okay gotcha. sorry bout the dumness. so if i saved them as .htm files, will it show when i click on one of my links. I want it to show as:
http://www.example.com/exits(no htm attached) |
|
|
|
| *mipadi* |
Mar 27 2007, 03:04 PM
Post
#8
|
|
Guest |
No, usually files that don't have an extension are directories. If you have a file at http://www.example.com/exists/index.html then you can reference it with http://www.example.com/exists.
|
|
|
|
Mar 27 2007, 03:09 PM
Post
#9
|
|
![]() talent on another level ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 746 Joined: Oct 2006 Member No: 475,735 |
so basically save it as what, this: http://www.example.com/exists? but i still have to save it as a .htm or something and it would show the extension. Sorry I just want to make sure I have everything right
|
|
|
|
| *mipadi* |
Mar 27 2007, 03:17 PM
Post
#10
|
|
Guest |
If a pathname doesn't have an extension, most browsers interpret it as a directory (or folder) name. So take this URL:
http://www.mydomain.com/mysite The name of the folder is mysite. Now, when a browser gets an address like that, it searches for a file in the folder mysite with the name index.{htm, html, asp, php, pl, ...}; if it doesn't find one with the basename index and an appropriate extension, it repeats the process with default.{htm, html, asp, php, pl, ...}. So in the case of the above URL, you are actually looking at a file named http://www.mydomain.com/mysite/index.html. So if you want a page to load by going to http://too-fresh.net/general/domain/, then you have to place a file named index.html in all of those directories. And yes, before some smart-ass can butt in, you can also accomplish this using Apache mod_rewrite rules, but that's too advanced for this situation. |
|
|
|
Mar 27 2007, 03:22 PM
Post
#11
|
|
![]() talent on another level ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 746 Joined: Oct 2006 Member No: 475,735 |
okay, l0l at the last comment. i get all that now, so basically name one of my links index.html?
|
|
|
|
| *mipadi* |
Mar 27 2007, 03:25 PM
Post
#12
|
|
Guest |
|
|
|
|
Mar 27 2007, 03:28 PM
Post
#13
|
|
![]() talent on another level ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 746 Joined: Oct 2006 Member No: 475,735 |
okay whoo! thanks, so i'ma name my blog link "index.html" right?
|
|
|
|
| *mipadi* |
Mar 27 2007, 03:52 PM
Post
#14
|
|
Guest |
Yeah.
|
|
|
|
Mar 27 2007, 03:57 PM
Post
#15
|
|
![]() talent on another level ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 746 Joined: Oct 2006 Member No: 475,735 |
YES! Thanks again
|
|
|
|
| *mipadi* |
Mar 27 2007, 04:05 PM
Post
#16
|
|
Guest |
Then just put a file called index.htm at the root of your server (probably in a folder called public_html).
|
|
|
|
Mar 27 2007, 04:08 PM
Post
#17
|
|
![]() talent on another level ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 746 Joined: Oct 2006 Member No: 475,735 |
so could i put it for example in my cutenews/example folder or make a seperate folder for it? Where is the root server cause I don't have a host yet to upload to, so I just wanted to know where it is ahead of time?
|
|
|
|
| *mipadi* |
Mar 28 2007, 11:11 AM
Post
#18
|
|
Guest |
so could i put it for example in my cutenews/example folder or make a seperate folder for it? Where is the root server cause I don't have a host yet to upload to, so I just wanted to know where it is ahead of time? The directory of your server is just the first directory, the place where you put everything. Basically, anytime you want to just type a URL without a filename, you have to put a file called index.html in that directory. |
|
|
|
Mar 28 2007, 01:52 PM
Post
#19
|
|
![]() talent on another level ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 746 Joined: Oct 2006 Member No: 475,735 |
okay I did that. I also made my blog link index.php cause that's where I will put cutenews. is that okay?
|
|
|
|
| *mipadi* |
Mar 28 2007, 02:55 PM
Post
#20
|
|
Guest |
Sounds good to me.
|
|
|
|
Mar 29 2007, 05:15 AM
Post
#21
|
|
![]() talent on another level ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 746 Joined: Oct 2006 Member No: 475,735 |
okay i got it, thanks
|
|
|
|
![]() ![]() |