how to link html folder's file with php folder's file - php

I have 2 folders html and php, in html all html files exist and in php all php file exist.
In html folder-> buycars.html exist which link with viewh.php(this is in php folder) how to create a linkā€¦ I use
<a href="php/viewh.php">
that is not working.

you need to jump one directory back
<a href="../php/viewh.php">

You need to go up one directory. To do this you simply append ../ to your directory path;
Click
You can also go up multiple by stacking them like so;
Click
EDIT: #Sourabh beat me to it.

Related

How do I get a button to open an HTML file located on my website?

It has been a ling time since i have had to code.
My situation is, i need to make a button that open an HTML file that I have located on my website. The HTML file is a interactive course that will open in a new window.
I have tried <button>launch Course</button> but I get a "page not found" error.
First of all, you don't need to combine the anchor tag with tag. In this case a tag is enough. Also, please check well the path, and verify that the HTML file is in the folder. /Text.
To verify that the file is accessible, and the name and the extension is correct, you can copy and paste the path in the browser to see if you can access it. Links can be absolute (the full path from the root, ex: C:/Users/path/to/folder/file.ext) or relative (the short path from the originating folder). If not, re-write the path until it works.
Tip: for security use rel="noopener noreferrer" to prevent potential malicious attacks.
Happy coding Brandon!
Make sure that your directory with the page you are currently on has the folder home and the html file is located within it.
Here's a example directory
/----------
| index.html(or the current page your on)
| home -------
| file.html

php - include html pages outside the root folder

On my php site I'm trying to include html pages outside the root folder (the html pages change automatically)
if I include an html page I get the 404 error for the linked files and if I include the linked files too they aren't displayed correctly
path/site/root/index.php
...
include("path/html/index1.html");
include("path/html/index1_files/img.png");
...
path/html/index1.html
...
<img src="index1_files/img.png">
...
result:
You need to specify the directory properly. So, in your case, when linking to the image, replace <img src="index1_files/img.png"> with <img src="./index1_files/img.png">. The ./ goes back into the folder the file is saved in, and ../ goes up one level. Your code is looking for a folder called index1_files within the current page.

css file not found?

I want to modify a site but the link to css file is like this
https://192.168.253.70/ossim/style/av_common.css?t=50e990c674ba3640e69c2ed0b79bbd0b
I don't get were the file css is to modify .. av-commen.css is a php file
Go to the root directory of the site. The navigate over ossim then click on style . Find the file says av_common.css and Edit it then finally save it! That's it! Pretty simple.

link to file in sub folder

please,I am trying to create link to a php file in sub folder using tag but when I am testing the link it gives "NOT FOUND" error this is the code About
Make sure that name of file or folder is correct with caps lock text. something like this in below:
About
If about.php is in pages folder and you are gonna link to another file in this folder, you must remove ../ from the code, something like this:
About
Please provide link of About.php that we'll check it out, it's easy way to find the problem.
Browse to the file in the browser manually, then work backwards.
Draw a map of your directories, for visual aid
For example;
.public_html/
..pages/
page1.html
..files/
...config/
..folder1
..folder2/
index.html
The link from index.html to pages/page1.html would be
Page1
The link from pages/page1.html to index.html would be
Index

included files php do not appear in a browser

I have a php page(index.php) that includes another html file(footer.html). Am using dreamweaver, and my problem is: The included file(footer.html) shows in the main file (index.php) in dreamweaver design view, but does not show in the browser preview. I have both the php files in the root directory, so they're at the same level. I have tried using require rather than include with the same result. My include code is:
<?php include("footer.html");?>
does anyone see something wrong off the bat?
Do realy exist file "footer.html"?
If no create them.
Is file "footer.html" in the same directory as "index.php"?
If no add it to the same directory.
Do you have any content in your "footer.html" file?
If no add any and check if it appears on page.

Categories