Highlighted

php coding in html file

New Here ,
Feb 09, 2018

Copy link to clipboard

Copied

i have a html template created in dreamweaver, when uploaded the browser directs me to my index of / page. im not sure what is missing from the coding im thinking im missing some php coding in the file so that the page may be displayed. Im new to dreamweaver first time trying to create site from scratch.

Viewing source code on your site, I see a lot of links like:

file:///Macintosh%20HD/Users/stevenlarocque/Desktop/html5up-overflow/assets/css/main.css

This is not a proper FQDN (Fully Qualified Domain Name) nomenclature.  What is required is either a FQDN path (ie, https://www.yourdomain.com/css/cssfile1.css), or a relative path (ie, /css/cssfile1.css).  The "file:" at the beginning indicates that you used an IDE (Integrated Development Environment) to set the link/reference on a local system (which might work locally but will break when you push it to the production server.)

Hope this helps,

^ _ ^

TOPICS
Learn Dreamweaver

Views

338

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

php coding in html file

New Here ,
Feb 09, 2018

Copy link to clipboard

Copied

i have a html template created in dreamweaver, when uploaded the browser directs me to my index of / page. im not sure what is missing from the coding im thinking im missing some php coding in the file so that the page may be displayed. Im new to dreamweaver first time trying to create site from scratch.

Viewing source code on your site, I see a lot of links like:

file:///Macintosh%20HD/Users/stevenlarocque/Desktop/html5up-overflow/assets/css/main.css

This is not a proper FQDN (Fully Qualified Domain Name) nomenclature.  What is required is either a FQDN path (ie, https://www.yourdomain.com/css/cssfile1.css), or a relative path (ie, /css/cssfile1.css).  The "file:" at the beginning indicates that you used an IDE (Integrated Development Environment) to set the link/reference on a local system (which might work locally but will break when you push it to the production server.)

Hope this helps,

^ _ ^

TOPICS
Learn Dreamweaver

Views

339

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 09, 2018 0
Adobe Community Professional ,
Feb 09, 2018

Copy link to clipboard

Copied

If you mean a Template .DWT file, that file does nothing when uploaded, it's only used by DW to update Child Pages made from it locally. You then need to upload the child pages to the server.

If you're not working with a .DWT file, we'll need a little more explanation, or maybe a link to your work in progress to help you out.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 09, 2018 0
New Here ,
Feb 09, 2018

Copy link to clipboard

Copied

i do not believe it is a .DWT file my website is www.les-mecanique.com if you were to load it it gives me the index menu of my public_html file from cpanel. the file landing page les 2018 simple.html is the desing i uploaded and if you click on that it does bring you to the page but not complete

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 09, 2018 0
LEGEND ,
Feb 09, 2018

Copy link to clipboard

Copied

The web server (IIS, Apache) should have the 'default documents' defined.

One thing that I can say, however, is that you should disable directory browsing as a security precaution.

Also, you should _NOT_ use spaces in document names.  Period.  Replace them with underscores and adjust your links accordingly.

Hope this helps.

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 09, 2018 1
Adobe Community Professional ,
Feb 09, 2018

Copy link to clipboard

Copied

Your home page must be saved to your site's root folder (whatever your hosting company said it was, usually public_html, www or htdocs) and it must also have one of the default home page names like index.html or default.php (ask your hosting company for the list if you're not sure). If the page doesn't have one of the default home page names from your server's list, or isn't in the site's root folder, it won't be recognized as your home page and you'll get the directory instead (if directory browsing is turned on).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 09, 2018 0
New Here ,
Feb 09, 2018

Copy link to clipboard

Copied

ok i uploaded the original index file from the template i used. now when i search my site it gives me the original template but still no css just the basic design code. would i need a index.html from my host?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 09, 2018 0
LEGEND ,
Feb 09, 2018

Copy link to clipboard

Copied

No you would not need an index.html page from your host, that is something you name your default page as, so the browser can find a starting file for your website when someone inserts your website domain name in the browsers url bar.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 09, 2018 0
LEGEND ,
Feb 09, 2018

Copy link to clipboard

Copied

If you must insist on using a non-standard default document name (like index.html, default.php, etc.), then at the very least you should create a document called index.html, place it in the root of your site, and use a meta tag to redirect browsers to your intended document.

After you remove the spaces from your document names and update your links accordingly.  This holds true for CSS files, JavaScript .js files.. everything.

V/r,

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 09, 2018 1
Adobe Community Professional ,
Feb 09, 2018

Copy link to clipboard

Copied

I'm seeing 404 File not found for your other files and folders (for your css, etc).

When you upload your page, you also need to upload all of the supporting files to the exact locations used locally.

If your site directory structure looks like this locally...

index.html

css

     cssfile1.css

images

     image1.jpg

     image2.jpg

pages

     page1.html

     page2.html

...then the directory structure needs to be exactly the same online (though there may be some server-side items in addition to it)...

index.html

cgi-bin

css

     cssfile1.css

images

     image1.jpg

     image2.jpg

pages

     page1.html

     page2.html

tracking

If your page works locally, but not after uploading, you need to make sure everything referenced in the page is also uploaded where the page expects them to be.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 09, 2018 0
LEGEND ,
Feb 09, 2018

Copy link to clipboard

Copied

Viewing source code on your site, I see a lot of links like:

file:///Macintosh%20HD/Users/stevenlarocque/Desktop/html5up-overflow/assets/css/main.css

This is not a proper FQDN (Fully Qualified Domain Name) nomenclature.  What is required is either a FQDN path (ie, https://www.yourdomain.com/css/cssfile1.css), or a relative path (ie, /css/cssfile1.css).  The "file:" at the beginning indicates that you used an IDE (Integrated Development Environment) to set the link/reference on a local system (which might work locally but will break when you push it to the production server.)

Hope this helps,

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 09, 2018 1
Adobe Community Professional ,
Feb 09, 2018

Copy link to clipboard

Copied

Ah, I hadn't noticed those.

@steve,

Those file paths are typically caused by forgetting to set up a Site Definition in DW. It's a crucial first step to make sure DW knows what it's working with...

Define a site

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 09, 2018 1