CSS doesn't work after convering to .PHP
#1

Okay guys, what happened was, I got everything working.. I then pressed "File > Save as... > index.php" and deleted the index.html

I removed a bit of code from the index.php and saved it as "header.inc.php" in the files "inc > incfiles > here" and added
"<? include("inc/incfiles/header.inc.php"); ?>" at the top of the index.php file but the CSS isn't showing.

Can someone help me or add me on skype and help me over Teamviewer?
Reply
#2

Change <? to <?php...
Reply
#3

Quote:
Originally Posted by BlackBank3
Посмотреть сообщение
Change <? to <?php...
You don't have to put the php there. It's not required
Reply
#4

Quote:
Originally Posted by thefatshizms
Посмотреть сообщение
You don't have to put the php there. It's not required
Some webhostings don't have enable the 'no need for "php" after bracket'.
Reply
#5

---remove
Reply
#6

Cut and paste the css into a file called something like "main.css"

Then in the <head> of the HTML in your PHP file, do this:

<link rel="stylesheet" type="text/css" href="main.css" media="screen" />

EDIT: And yes, ALWAYS use <?php
I believe it is in good practice as most PHP interpreters look for that.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)