Copy link to clipboard
Copied
Hello
Another day another new web design project, would be fun if only I knew what I was doing. Anyhow I am picking up a project that was started by somebody else (the story of my life these last couple of weeks) where all the pages thus far are .php. So here is a question that I have that might not make sense.
I am used to creating very amateur websites with HTML in Dreamweaver but as far as I can tell is that there is not too much of a difference right now but there probably is so do not take my head off with that comment. One thing that I do seem to see a difference is in the links to other pages within the same site; this is one for example:
<li><a href="news.php">News</a></li>
I think in using HTML you have to have a full link to the page, like the entire location including folders and all? But that is not my question, my question has to do with setting up folders. So far I have only finished the index page and it is sitting directly in "public_html". I have sub folders in "public_html" for "scripts", "css" and "images". I am going to have a lot of sub pages off of index so can I start a folder within "public_html" to contain all the sub pages without hurting navigation?
Hope this is clear?
Thanks
This has nothing to do with PHP in particular. It applies to all websites, regardless of whether they use .html, .php, .asp, .cfm, or whatever. It's just the basic folder hierarchy of the website.
In many hosting environments, public_html is the name of the site root. In other words, it's where you put the site's main page, index.html, index.php, or whatever. The link that you showed simply means that news.php is in the same folder as the file that's linking to it. If you create a new subfolder i
...Copy link to clipboard
Copied
This has nothing to do with PHP in particular. It applies to all websites, regardless of whether they use .html, .php, .asp, .cfm, or whatever. It's just the basic folder hierarchy of the website.
In many hosting environments, public_html is the name of the site root. In other words, it's where you put the site's main page, index.html, index.php, or whatever. The link that you showed simply means that news.php is in the same folder as the file that's linking to it. If you create a new subfolder in public_html, it works exactly the same way as your scripts, css, and images folders. Say the subfolder is called products, you link from the index page to like this:
<a href="products/somepage.php">Go to some page</a>
However, to link from one page in the products subfolder to another in the same folder, it would just be href="somepage.php".
Copy link to clipboard
Copied
Thanks David this is exactly what I was looking for. Sorry for the post in the wrong section, I am really new to web site design but am learning a lot through my mistakes and those willing to help on the forum.