PDA

View Full Version : PHP help for newbie...



coolblu
June 26th, 2001, 16:23
I wonder if anyone can help me.
I want to put variable (such as font colors etc) from an .inc file into the code of my PHP pages, so I can call it as "$whatever", but I can't seem to do this. Is this possible? I am currently using

<?php include=("filename.inc"); ?>

Where is this going wrong? I am trying to use it for a text quotes rotator (which includes some html)

I also pull this in (the quote script) using the same include above.

Any help would be much appreciated.

Blu :rolleyes:

WHo CaREs
June 27th, 2001, 01:11
<?php include("filename.inc");?>

then the files thats being call do:

<?php

$fontcolor1 = "FFFFFFF";
$fontsize1 = "1";

?>

then on the page you want them on do:

<?php echo $fontcolor1 ?>

coolblu
June 27th, 2001, 15:00
I still cant get it to work.

Instead of printing the variable such as #000000 for black font color, it prints <?php echo $rltext ?> ($rltext is the variable)

Any advice?


Thanks again

Nick

lucifer
June 27th, 2001, 15:22
sound like its not going to php

you did call the page something.php or whatever is used on your server .phtml .php3 are sometimes used

or are you using php as a cgi so need a #!/usr/php or something

check your servers FAQ

gyrbo
June 27th, 2001, 17:04
Are you sure php is enabled on your server? What host are you on?

coolblu
June 29th, 2001, 10:06
I am using mycgiserver.com, which I believe has PHP support (Im not sure if it's 3 or 4), but all of my other php scripts work here...

coolblu
June 29th, 2001, 10:08
It's PHP 4.0.3pl1

Dedix
July 4th, 2001, 19:05
mycgiserver is a piece of crap...
try on f2s.com, go-build.net. or barrysworld.com