Question about including html page in PHP

If I include an HTML page in a PHP page (say index.php) with the following:

<?php
include ("../../forms/login/form.html");
?>

Then will form.php display correctly in index.php? When I speak correctly, I mean all its images and CSS.

I ask because it is not. I tried this and it will show form.html, but without any style ...

Any help would be appreciated, thanks!

UPDATE:


I currently have the following in forms.html:

<link href="view.css" media="all" rel="stylesheet" type="text/css" />
<script src="view.js" type="text/javascript"></script>
<link href="../../css/style.css" rel="stylesheet" type="text/css" />

Now, forms.html displays correctly on its own.

In index.php, I have:

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>UofS :: Residence Life Management System</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />

</head>

<body>

<?php
include ("html/header.html");
?>

<?php
include ("php/navigation.php");
?>
<br></br>
<?php
include ("forms/login/form.html");
?>
<br></br>
<?php
include ("html/footer.html");
?>

</body>

</html>

The only link to forms.html is through php include (). There is no stylesheet on it. This is a page that does not load form.html correctly. It is not right?

Thank!

+5
3

, , . URL- (index.php). .

: view.css view.js , . index.php. , form.html . index.php , , .

, , , index.php, form.html.

, , , :

<link href="/css/style.css" rel="stylesheet" type="text/css" />

"css/style.css" , dev-.

...

, index.php , form.html:

<link href="/forms/login/view.css" media="all" rel="stylesheet" type="text/css" />
<script src="/forms/login/view.js" type="text/javascript"></script>
<link href="/css/style.css" rel="stylesheet" type="text/css" />
+10

form.html, - ...

CSS. , .

<link rel="stylesheet" type="text/css" href="style.css" /> 

:

<link rel="stylesheet" type="text/css" href="http://host/path/to/style.css" /> 
+3

HTML PHP. URL- PHP, .

0

All Articles