PDA

View Full Version : Quick PHP Question



Shibby-Shabs
12-02-2010, 09:31 AM
I'm using

<?php include("whatever.php"); ?>
but I'm in ROOT > STAFF > GUIDES but the page I want to include is in ROOT > STAFF.

Jamesy
12-02-2010, 10:10 AM
if you want to go down a directory:


<?php include("../whatever.php"); ?>

Shibby-Shabs
12-02-2010, 11:18 AM
if you want to go down a directory:


<?php include("../whatever.php"); ?>

Ahhhh... Thank you, I knew it was something like that.. I has ..whatever.php :8

- EDIT ///
Any reason why this doesn't show?

site you're djing on, for example <?php echo $sitename; ?>. Last of all under "Track Title/URL" there is an option that says "Enable title updates" which should be ticked along side with "Title".
The code is in between general text, html though.

at the top of the page I've got

<?php include("../config.php"); ?>
which links to config.php which has

<?php

$host = "localhost";

$user = "root";

$pass = "123";

$data = "blahblah";

$sitename = "YOUR SITE NAME";

$ms = mysql_pconnect($host, $user, $pass);

if( !$ms )

{

echo "Error connecting to database.
";

}

mysql_select_db($data);

?>

LMS16
12-02-2010, 03:31 PM
site you're djing on, for example <?php echo("$sitename"); ?>. Last of all under "Track Title/URL" there is an option that says "Enable title updates" which should be ticked along side with "Title".

Try that, maybe it doesnt matter but mehh lol


Lew.

Fehm
12-02-2010, 07:05 PM
Your page is a .php right? :)

Shibby-Shabs
13-02-2010, 03:23 AM
Try that, maybe it doesnt matter but mehh lol


Lew.
I'll give it a try soon - not on my computer.

Your page is a .php right? :)

Yes, of course. Good question thought ;)

Want to hide these adverts? Register an account for free!