PHPBB How do you load files through public_html - php

I am doing a school project but I am having some trouble with PHPBB because I cant get it to load files through public_html. I would appreciate some help with this thanks. If you have any questions I will happily answer them.
<?php include("/home/***/public_html/application/config/autoload.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>
<div class='title-box'>
<img src='http://www.berkley.school.nz/wp-content/themes/sparky/img/logo.min.png'>
</div>
<div class="header">
<div class="header_left_box">
<ul id="menu">
<li <?php if ($this->checkForActiveController($filename, "forum")) { echo ' class="active" '; } ?> >
Forum
</li>
<li <?php if ($this->checkForActiveController($filename, "helpcenter")) { echo ' class="active" '; } ?> >
Help Center
</li>
<?php if (Session::get('user_logged_in') == true):?>
<li <?php if ($this->checkForActiveController($filename, "dashboard")) { echo ' class="active" '; } ?> >
Dashboard
</li>
<?php endif; ?>
<?php if (Session::get('user_logged_in') == true):?>
<li <?php if ($this->checkForActiveController($filename, "login")) { echo ' class="active" '; } ?> >
My Account
<ul class="sub-menu">
<li <?php if ($this->checkForActiveController($filename, "login")) { echo ' class="active" '; } ?> >
Change account type
</li>
<li <?php if ($this->checkForActiveController($filename, "login")) { echo ' class="active" '; } ?> >
Upload an avatar
</li>
<li <?php if ($this->checkForActiveController($filename, "login")) { echo ' class="active" '; } ?> >
Edit my username
</li>
<li <?php if ($this->checkForActiveController($filename, "login")) { echo ' class="active" '; } ?> >
Edit my email
</li>
<li <?php if ($this->checkForActiveController($filename, "login")) { echo ' class="active" '; } ?> >
Edit my password
</li>
<li <?php if ($this->checkForActiveController($filename, "login")) { echo ' class="active" '; } ?> >
Logout
</li>
</ul>
</li>
<?php endif; ?>
<?php if (Session::get('user_type') == 1):?>
<li <?php if ($this->checkForActiveController($filename, "student")) { echo ' class="active" '; } ?> >
Student
<ul class="sub-menu">
<li <?php if ($this->checkForActiveController($filename, "student")) { echo ' class="active" '; } ?> >
</li>
</ul>
</li>
<?php endif; ?>
<?php if (Session::get('user_type') == 2):?>
<li <?php if ($this->checkForActiveController($filename, "student")) { echo ' class="active" '; } ?> >
Student
<ul class="sub-menu">
<li <?php if ($this->checkForActiveController($filename, "student")) { echo ' class="active" '; } ?> >
</li>
</ul>
</li>
<li <?php if ($this->checkForActiveController($filename, "teacher")) { echo ' class="active" '; } ?> >
Teacher
<ul class="sub-menu">
<li <?php if ($this->checkForActiveController($filename, "teacher")) { echo ' class="active" '; } ?> >
</li>
</ul>
</li>
<?php endif; ?>
<?php if (Session::get('user_type') == 3):?>
<li <?php if ($this->checkForActiveController($filename, "student")) { echo ' class="active" '; } ?> >
Student
<ul class="sub-menu">
<li <?php if ($this->checkForActiveController($filename, "student")) { echo ' class="active" '; } ?> >
</li>
</ul>
</li>
<li <?php if ($this->checkForActiveController($filename, "teacher")) { echo ' class="active" '; } ?> >
Teacher
<ul class="sub-menu">
<li <?php if ($this->checkForActiveController($filename, "teacher")) { echo ' class="active" '; } ?> >
</li>
</ul>
</li>
<li <?php if ($this->checkForActiveController($filename, "admin")) { echo ' class="active" '; } ?> >
Admin
<ul class="sub-menu">
<li <?php if ($this->checkForActiveController($filename, "admin")) { echo ' class="active" '; } ?> >
</li>
</ul>
</li>
<?php endif; ?>
</ul>
</div>
</div>
<div class="header">
<div class="header_right_box">
<ul id="menu">
<?php if (Session::get('user_logged_in') == false):?>
<li <?php if ($this->checkForActiveControllerAndAction($filename, "login/index")) { echo ' class="active" '; } ?> >
Login
</li>
</ul>
</li>
<?php endif; ?>
</ul>
</div>
<?php if (Session::get('user_logged_in') == true): ?>
<div class="header_right_box">
<div class="namebox">
Hello <?php echo Session::get('user_name'); ?>!
</div>
<div class="avatar">
<?php if (USE_GRAVATAR) { ?>
<img src='<?php echo Session::get('user_gravatar_image_url'); ?>'
style='width:<?php echo AVATAR_SIZE; ?>px; height:<?php echo AVATAR_SIZE; ?>px;' />
<?php } else { ?>
<img src='<?php echo Session::get('user_avatar_file'); ?>'
style='width:<?php echo AVATAR_SIZE; ?>px; height:<?php echo AVATAR_SIZE; ?>px;' />
<?php } ?>
</div>
</div>
<?php endif; ?>
<div class="clear-both"></div>
</div>
<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
<title>{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE}</title>
<!-- IF S_ENABLE_FEEDS -->
<!-- IF S_ENABLE_FEEDS_OVERALL --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {SITENAME}" href="{U_FEED}" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_NEWS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_NEWS}" href="{U_FEED}?mode=news" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_FORUMS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_ALL_FORUMS}" href="{U_FEED}?mode=forums" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_TOPICS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_NEW}" href="{U_FEED}?mode=topics" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_TOPICS_ACTIVE --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_ACTIVE}" href="{U_FEED}?mode=topics_active" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_FORUM and S_FORUM_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FORUM} - {FORUM_NAME}" href="{U_FEED}?f={S_FORUM_ID}" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{U_FEED}?f={S_FORUM_ID}&t={S_TOPIC_ID}" /><!-- ENDIF -->
<!-- ENDIF -->
<!--
phpBB style name: prosilver
Based on style: prosilver (this is the default phpBB3 style)
Original author: Tom Beddard ( http://www.subBlue.com/ )
Modified by:
-->
<script type="text/javascript">
// <![CDATA[
var jump_page = '{LA_JUMP_PAGE}:';
var on_page = '{ON_PAGE}';
var per_page = '{PER_PAGE}';
var base_url = '{A_BASE_URL}';
var style_cookie = 'phpBBstyle';
var style_cookie_settings = '{A_COOKIE_SETTINGS}';
var onload_functions = new Array();
var onunload_functions = new Array();
<!-- IF S_USER_PM_POPUP and S_NEW_PM -->
var url = '{UA_POPUP_PM}';
window.open(url.replace(/&/g, '&'), '_phpbbprivmsg', 'height=225,resizable=yes,scrollbars=yes, width=400');
<!-- ENDIF -->
/**
* Find a member
*/
function find_username(url)
{
popup(url, 760, 570, '_usersearch');
return false;
}
/**
* New function for handling multiple calls to window.onload and window.unload by pentapenguin
*/
window.onload = function()
{
for (var i = 0; i < onload_functions.length; i++)
{
eval(onload_functions[i]);
}
};
window.onunload = function()
{
for (var i = 0; i < onunload_functions.length; i++)
{
eval(onunload_functions[i]);
}
};
// ]]>
</script>
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/styleswitcher.js"></script>
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script>
<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="{T_THEME_PATH}/normal.css" rel="stylesheet" type="text/css" title="A" />
<link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
<link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
<link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->
</head>
<body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}">
<div id="wrap">
<a id="top" name="top" accesskey="t"></a>
<div id="page-header">
<div class="headerbar">
<div class="inner"><span class="corners-top"><span></span></span>
<div id="site-description">
{SITE_LOGO_IMG}
<h1>{SITENAME}</h1>
<p>{SITE_DESCRIPTION}</p>
<p class="skiplink">{L_SKIP}</p>
</div>
<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
<div id="search-box">
<form action="{U_SEARCH}" method="get" id="search">
<fieldset>
<input name="keywords" id="keywords" type="text" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" />
<input class="button2" value="{L_SEARCH}" type="submit" /><br />
{L_SEARCH_ADV} {S_SEARCH_HIDDEN_FIELDS}
</fieldset>
</form>
</div>
<!-- ENDIF -->
<span class="corners-bottom"><span></span></span></div>
</div>
<div class="navbar">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="linklist navlinks">
<li class="icon-home">{L_INDEX} <!-- BEGIN navlinks --> <strong>‹</strong> {navlinks.FORUM_NAME}<!-- END navlinks --></li>
<li class="rightside">{L_CHANGE_FONT_SIZE}</li>
<!-- IF U_EMAIL_TOPIC --><li class="rightside">{L_EMAIL_TOPIC}</li><!-- ENDIF -->
<!-- IF U_EMAIL_PM --><li class="rightside">{L_EMAIL_PM}</li><!-- ENDIF -->
<!-- IF U_PRINT_TOPIC --><li class="rightside">{L_PRINT_TOPIC}</li><!-- ENDIF -->
<!-- IF U_PRINT_PM --><li class="rightside">{L_PRINT_PM}</li><!-- ENDIF -->
</ul>
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
<ul class="linklist leftside">
<li class="icon-ucp">
{L_PROFILE}
<!-- IF S_DISPLAY_PM --> ({PRIVATE_MESSAGE_INFO})<!-- ENDIF -->
<!-- IF S_DISPLAY_SEARCH --> •
{L_SEARCH_SELF}
<!-- ENDIF -->
<!-- IF U_RESTORE_PERMISSIONS --> •
{L_RESTORE_PERMISSIONS}
<!-- ENDIF -->
</li>
</ul>
<!-- ENDIF -->
<ul class="linklist rightside">
<li class="icon-faq">{L_FAQ}</li>
<!-- IF not S_IS_BOT -->
<!-- IF S_DISPLAY_MEMBERLIST --><li class="icon-members">{L_MEMBERLIST}</li><!-- ENDIF -->
<!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) --><li class="icon-register">{L_REGISTER}</li><!-- ENDIF -->
<li class="icon-logout">{L_LOGIN_LOGOUT}</li>
<!-- ENDIF -->
</ul>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<a name="start_here"></a>
<div id="page-body">
<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN and (U_MCP or U_ACP) -->
<div id="information" class="rules">
<div class="inner"><span class="corners-top"><span></span></span>
<strong>{L_INFORMATION}:</strong> {L_BOARD_DISABLED}
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->

You need to enclose the path in quotes:
<?php include('/home/***/public_html/application/config/autoload.php');?>
or
<?php include("/home/***/public_html/application/config/autoload.php");?>

There are a number of major issues with the code you've posted.
As identified by l'L'l, your include() syntax is incorrect.
You are attempting to mix PHP code with phpBB template syntax (e.g, {VARIABLE}, <!-- IF CONDITION -->). They are not compatible.
Your HTML is badly disordered; it has a bunch of content in <head>. This doesn't belong here.
It looks as though you may be trying to do too much, too fast here. Sit down and learn PHP properly before you continue.

Related

How can I use header() function to redirect to index if login is successful?

I have created a website and am implementing login functionality. I have created separate php file for main menu and am including it as required. When I try to login it says header has already been sent. I am new to php and wanted to implement master page and child pages but session seeems to create a problem.
Tried storing Request_URI in session and redirect using header for index to login if not logged in and from login to index on successfull login.
index page
Login page
<?php include('includes/session/mysession.php') ?>
<?php include('includes/navigation/navigation.php') ?>
<?php include('DbConnections/config.php') ?>
<section id="login-page-wrap" class="section-padding">
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-8 m-auto">
<div class="login-page-content">
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$uname = $_POST['username'];
$pwd = $_POST['password'];
if (empty($uname) || empty($pwd)) {
$output = "Please enter all fields.";
echo 'output : ' . $output;
} else {
$uname = $mysqli->real_escape_string($uname);
$pwd = $mysqli->real_escape_string($pwd);
echo $uname;
echo $pwd;
$query = $mysqli->query("SELECT id FROM users
WHERE username = '$uname'
AND password = md5('$pwd')");
echo 'query done';
if ($query->num_rows == 0) {
$output = "Invalid username/password";
// echo $output;
} else {
echo 'Success';
$_SESSION['loggedin'] = TRUE;
$_SESSION['user'] = $uname;
$output = "WELCOME " . $_SESSION['user'];
// On successful login
$redirect = $_SESSION['redirect_to'];
// unset the session var
unset($_SESSION['redirect_to']);
header("Location: $redirect");
exit();
// header('location: index.php');
// echo $output;
}
}
}
//echo 'output : ' . $output;
?>
<?php
if (!isset($_SESSION['loggedin'])) { ?>
<div class="login-form">
<h3>Welcome !</h3>
<form method="POST">
<div class="username">
<input name="username" type="text" placeholder="Email or Username">
</div>
<div class="password">
<input name="password" type="password" placeholder="Password">
</div>
<div class="log-btn">
<button type="submit"><i class="fa fa-sign-in"></i> Log In</button>
</div>
</form>
</div>
<?php
} else {
echo 'Done.';
}
?>
</div>
</div>
</div>
</div>
</section>
config.php
<?php
/* Database credentials. Assuming you are running MySQL
server with default setting (user 'root' with no password) */
//pass variables for values
$dbserver = 'localhost';
$dbusername = 'root';
$dbpassword = '';
$dbname = 'cs';
define('DB_SERVER', $dbserver);
define('DB_USERNAME', $dbusername);
define('DB_PASSWORD', $dbpassword);
define('DB_NAME', $dbname);
/* Attempt to connect to MySQL database */
$mysqli = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
// Check connection
if ($mysqli === false) {
die("ERROR: Could not connect. " . $mysqli->connect_error);
}
?>
mysession.php
<?php session_start();?>
mainmenu.php
<?php
$HomeActive = '';
$ServiceActive = '';
$CarsActive = '';
$AboutActive = '';
$BlogActive = '';
$PagesActive = '';
$ContactsActive = '';
?>
<div class="col-lg-8 d-none d-xl-block">
<nav class="mainmenu alignright">
<ul>
<li class="<?php echo $HomeActive; ?>">Home
<ul>
<li>Home 1</li>
<li>Home 2</li>
<li>Home 3</li>
</ul>
</li>
<li class="<?php echo $AboutActive; ?>">About</li>
<li class="<?php echo $ServiceActive; ?>">services</li>
<li class="<?php echo $CarsActive; ?>">Cars
<ul>
<li>Car Left Sidebar</li>
<li>Car Right Sidebar</li>
<li>Car Without Sidebar</li>
<li>Car Details</li>
</ul>
</li>
<li class="<?php echo $PagesActive; ?>">Pages
<ul>
<li>Pricing</li>
<li>Driver</li>
<li>FAQ</li>
<li>Gallery</li>
<li>Help Desk</li>
<li>Log In</li>
<li>Register</li>
<li>404</li>
</ul>
</li>
<li class="<?php echo $BlogActive; ?>">Blog
<ul>
<li>Blog Page</li>
<li>Blog Details</li>
</ul>
</li>
<li class="<?php echo $ContactsActive; ?>">Contact</li>
</ul>
</nav>
</div>```
navigation.php
<!DOCTYPE html>
<html cla s s="no-js" la n g="zx x">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--=== Favicon ===-->
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<title>Cardoor - Car Rental HTML Template</title>
<!--=== Bootstrap CSS ===-->
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<!--=== Slicknav CSS ===-->
<link href="assets/css/plugins/slicknav.min.css" rel="stylesheet">
<!--=== Magnific Popup CSS ===-->
<link href="assets/css/plugins/magnific-popup.css" rel="stylesheet">
<!--=== Owl Carousel CSS ===-->
<link href="assets/css/plugins/owl.carousel.min.css" rel="stylesheet">
<!--=== Gijgo CSS ===-->
<link href="assets/css/plugins/gijgo.css" rel="stylesheet">
<!--=== FontAwesome CSS ===-->
<link href="assets/css/font-awesome.css" rel="stylesheet">
<!--=== Theme Reset CSS ===-->
<link href="assets/css/reset.css" rel="stylesheet">
<!--=== Main Style CSS ===-->
<link href="style.css" rel="stylesheet">
<!--=== Responsive CSS ===-->
<link href="assets/css/responsive.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="//oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="//oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="loader-active">
<!--== Preloader Area Start ==-->
<!-- <div class="preloader">
<div class="preloader-spinner">
<div class="loader-content">
<img src="assets/img/preloader.gif" alt="JSOFT">
</div>
</div>
</div> -->
<!--== Preloader Area End ==-->
<!--== Header Area Start ==-->
<header id="header-area" class="fixed-top">
<!--== Header Top Start ==-->
<div id="header-top" class="d-none d-xl-block">
<div class="container">
<div class="row">
<!--== Single HeaderTop Start ==-->
<div class="col-lg-3 text-left">
<i class="fa fa-map-marker"></i> 802/2, Mirpur, Dhaka
</div>
<!--== Single HeaderTop End ==-->
<!--== Single HeaderTop Start ==-->
<div class="col-lg-3 text-center">
<i class="fa fa-mobile"></i> +1 800 345 678
</div>
<!--== Single HeaderTop End ==-->
<!--== Single HeaderTop Start ==-->
<div class="col-lg-3 text-center">
<i class="fa fa-clock-o"></i> Mon-Fri 09.00 - 17.00
</div>
<!--== Single HeaderTop End ==-->
<!--== Social Icons Start ==-->
<div class="col-lg-3 text-right">
<div class="header-social-icons">
<i class="fa fa-behance"></i>
<i class="fa fa-pinterest"></i>
<i class="fa fa-facebook"></i>
<i class="fa fa-linkedin"></i>
</div>
</div>
<!--== Social Icons End ==-->
</div>
</div>
</div>
<!--== Header Top End ==-->
<!--== Header Bottom Start ==-->
<div id="header-bottom">
<div class="container">
<div class="row">
<!--== Logo Start ==-->
<div class="col-lg-4">
<a href="index.php" class="logo">
<img src="assets/img/logo.png" alt="JSOFT">
</a>
</div>
<!--== Logo End ==-->
<!--== Main Menu Start ==-->
<?php include('includes/navigation/mainmenu.php') ?>
<!--== Main Menu End ==-->
</div>
</div>
</div>
<!--== Header Bottom End ==-->
</header>
<!--== Header Area End ==-->```
You echoed, before the redirect header, that's why you're getting that message. What you want to achieve looks like a client side job. Try replacing the php redirect with js.
Replace this:
header("Location: $redirect");
with this
echo "<script>window.location = '$redirect';</script>";

AngularJs is not working after calling a php file

I am using AngularJS in header.php and create_test.php files. It is working fine when I execute the files separately.
Then I am calling this header.php create_test.php file.
After calling create_test.php file AngularJS codes are not working.
Why is it so? Can anyone assist me to solve this?
In header.php file,
<?php
//calling methods of methods.php file
include'C:/wamp64/www/performance/header/src/demo/methods.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" type="image/png" href="http://localhost/performance/login/images/merahkee.png" />
<title> Merahkee Technology Soluctions</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<!-- SmartMenus jQuery Bootstrap 4 Addon CSS -->
<link href="../addons/bootstrap-4/jquery.smartmenus.bootstrap-4.css" rel="stylesheet">
<!--Angularjs-->
<script data-require="angular.js#*" data-semver="1.6.9" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.7/angular.js"></script>
<!--This version is for title attribute-->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.js"></script>
<!--Angularjs starts-->
<script src="http://localhost/performance/header/src/addons/bootstrap-4/header.js"></script>
</head>
<body style="padding-top:80px;">
<!-- Navbar -->
<nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark">
<div ng-app="rootApp" class="container">
<a ng-app = "firstApp" ng-controller = "firstController" class="navbar-brand" href="#">{{ pageTitle }}</a>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<!-- Left nav -->
<ul class="nav navbar-nav mr-auto">
<!--Display project dropdown-->
<li ng-app = "thirdApp" ng-controller = "thirdController" class="nav-item dropdown" style="padding-right:15px;" ><a class="nav-link dropdown-toggle" href="#">{{Project}}</a>
<ul class="dropdown-menu">
<?php
echo '<li><a class="dropdown-item">Recent Projects </a></li>';
for($i=0;$i<$projectcount;$i++){
//calling test_name() method and storing those values in a string
$test=project_name($count_uid,$user_id,$pro_sql);
$project_name=$test[$i];
if(strlen($project_name)>=25){
$projectName=substr($project_name,0,25);
$projectName=$projectName.'..';
}
else{
$projectName=$project_name;
}
echo'<li><a class="dropdown-item" href="http://localhost/performance/project/ShowTest_of_project.php?project_name='.$project_name.'&user_id='.$user_id.'" title="'.$project_name.'">'.$projectName.'</a></li>';
}//for loops ends
//show all projects
echo'<li ng-app = "seventhApp" ng-controller = "seventhController"><a ng-repeat="x in sdc_pro" class="dropdown-item" href="{{x.href}}'.$user_id.'">{{x.name}}</a></li>';
?>
</ul><!--dropdown-menu closes-->
</li><!--project dropdown ends-->
<li ng-app = "fourApp" ng-controller = "fourController" class="nav-item dropdown"><a style="padding-right:15px;" class="nav-link dropdown-toggle" href="#">{{Test}}</a>
<ul class="dropdown-menu">
<?php
echo '<li><a class="dropdown-item">Recent Tests </a></li>';
for($i=0;$i<$testcount;$i++){
//calling test_name() method and storing those values in a string
$test1=recent_test1($test_sql);
$test_name1=$test1[$i];
//project name
$project=recentTest_project($test_sql);
$project_name=$project[$i];
//platform file name
$platform=platform_file();
$platform_file=$platform[$i];
//project id
$project_id=pro_id($test_sql);
$pro_id=$project_id[$i];
//calling file_name() method and storing those values in a string
//$file=load_file_name();
//$file_name=$file[$i];
//echo' <a type="submit" name="testname" href='.$file_name.'>'.$test_name.'</a><br>';
if(strlen($test_name1)>=25){
$testName=substr($test_name1,0,25);
$testName=$testName.'..';
}
else{
$testName=$test_name1;
}
echo'<li><a class="dropdown-item" href="http://localhost/performance/RunTest_09.php?test_name='.$test_name1.'&project_name='.$project_name.'" title="'.$test_name1.'">'.$testName.'</a></li>';
}//for loops ends
//show all projects ,delete project and create project
echo'<li ng-app = "eighthApp" ng-controller = "eigthController"><a ng-repeat="x in sdc_test" class="dropdown-item" href="{{x.href}}'.$user_id.'">{{x.name}}</a></li>';
?>
</ul>
</li><!--test dropdown ends-->
<li ng-app = "fifthApp" ng-controller = "fifthController" class="nav-item dropdown"><a class="nav-link dropdown-toggle" href="#">{{Report}}</a>
<ul class="dropdown-menu">
<li></li>
</ul>
</li><!--report list ends-->
</ul>
<ul class="nav navbar-nav">
<li ng-app = "sixthApp" ng-controller = "sixthController" class="nav-item dropdown"><a class="nav-link dropdown-toggle" href="#">{{default}}</a>
<ul class="dropdown-menu">
<li><a ng-repeat="x in details" class="dropdown-item" href="{{x.href}}">{{x.name}}</a></li>
</ul>
</li>
</ul>
</div><!--collapse navbar-collapse-->
</div>
</nav>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
<!-- SmartMenus jQuery plugin -->
<script type="text/javascript" src="http://localhost/performance/header/src/jquery.smartmenus.js"></script>
<!-- SmartMenus jQuery Bootstrap 4 Addon -->
<script type="text/javascript" src="http://localhost/performance/header/src/addons/bootstrap-4/jquery.smartmenus.bootstrap-4.js"></script>
</body>
</html>
In cteate_test file,
<?php
include_once 'C:\xampp\htdocs\Performance\header\src\demo\header.php';
include_once 'C:\xampp\htdocs\Performance\project\methods\methods.php';
?>
<!DOCTYPE html>
<html>
<head>
<script>
function ConfirmDelete() {
return confirm("Are you sure you want to delete?");
}
</script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="http://localhost/performance/project/css/showAllProject.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<!--Angularjs-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.9/angular.js"></script>
<script >
var app = angular.module("myApp", []);
app.controller("namesCtrl", function($scope) {
$scope.names = [
{name:'PROJECT'},
{name:' |DESCRIPTION'},
{name:' |CREATEDON'},
{name:' |LASTUPDATED'},
{name:' |'},
]
$scope.hrefs = [
{href:'http://localhost/performance/deleteProject_showAll_pro.php?project_name=',src:'http://localhost/performance/css/delete.png',title:'delete',alt:'delete',onclick:'return ConfirmDelete()'},
{href:'http://localhost/performance/editProject_form.php?project_name=',src:'http://localhost/performance/css/edit.ico',title:'edit',alt:'edit',onclick:''},
{href:'http://localhost/performance/copyProject_form.php?project_name=',src:'http://localhost/performance/css/copy_pro.png',title:'copy',alt:'edit',onclick:''},
]
});
</script>
</head>
<body style="font-size:12px;">
<div class="row">
<div class="container">
<div class="col-lg-10" id="col-lg-14" >
</div>
<div ng-app="myApp" ng-controller ="namesCtrl" class="row vertical-center-row" id="myApp">
<div class="col-lg-20" id="myApp-main">
<div class="row">
<div ng-repeat="x in names" class="col" id="col">
{{x.name}}
</div>
</div>
</div>
<div class="col-lg-12" id="project" >
<?php
for($i=0;$i<$procount;$i++){
//calling test_name() method and storing those values in a string
$project=project_name1($user_id);
$project_name=$project[$i];
//description
$desctipt=project_description1($user_id);
$description=$desctipt[$i];
// project creation date
$date=ProjectCreated_date($user_id);
$created_on=$date[$i];
//project edited on
$editDate=ProjectEdited_date($user_id);
$edited_on=$editDate[$i];
//for displaying the project
if(strlen($project_name)>=25){
$projectName=substr($project_name,0,25);
$projectName=$projectName.'..';
}
else{
$projectName=$project_name;
}
//for displaying the description of the project
if(strlen($description)>=25){
$description=substr($description,0,25);
$description=$description.'..';
}
else{
$description=$description;
}
//display project name, discription,created date and deleted date date
echo '<div class="row" id="row" ng-mouseover="changeImage=true" ng-mouseleave="changeImage=false" ng-init="changeImage=false">';
//projectName
echo'<div class="col">';
echo $projectName;
echo '</div>';
//description
echo'<div class="col" >';
echo $description;
echo '</div>';
//created date
echo'<div class="col" >';
echo $created_on;
echo '</div>';
//last updated date
echo'<div class="col" >';
echo $edited_on;
echo '</div>';
//
echo'<div class="col col-sm-1" ng-repeat="x in hrefs">';
echo '
<img src="{{x.src}}" title="{{x.title}}" alt="{{x.alt}}" style="width:15px;height:15px;border:0;" Onclick=""/>';
//<img ng-show="changeImage" src="http://localhost/performance/css/edit.ico" title="edit" alt="running test" style="width:15px;height:15px;border:0;margin-left:0.5cm">
//<img ng-show="changeImage" src="http://localhost/performance/css/copy_pro.png" title="copy" alt="running test" style="width:15px;height:15px;border:0;margin-left:0.5cm"/>';
echo '</div>';
echo'</div>';//display project name, discription,created date and deleted date date div ends
echo '<hr id="hr">';}//for loop ends
?>
</div> <!--project div ends-->
<div class="col-lg-12" id="createProject" >
<center><img src="http://localhost/performance/css/create.png" title="Create Test" alt="Create New Project" id="createProjectIMG"></center>
</div>
</div><!--myApp div ends-->
</div><!--container-fluid div ends-->
</div><!--row div ends-->
</body>
</html>

how to fetch images from database through image id

I have done a gallery page by fetching images from a database. Now I have to view a particular image in that page. For that I need to set id for the particular image to view. What is the code to view image through id?
<!doctype html>
<!--[if IE 7 ]> <html lang="en-gb" class="isie ie7 oldie no-js"> <![endif]-->
<!--[if IE 8 ]> <html lang="en-gb" class="isie ie8 oldie no-js"> <![endif]-->
<!--[if IE 9 ]> <html lang="en-gb" class="isie ie9 no-js"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en-gb" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Image Dental Clinic</title>
<meta name="description" content="">
<meta name="author" content="">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- **Favicon** -->
<link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<!-- **CSS - stylesheets** -->
<link id="default-css" href="style.css" rel="stylesheet" media="all" />
<link id="shortcodes-css" href="shortcodes.css" rel="stylesheet" media="all" />
<link id="skin-css" href="skins/green/style.css" rel="stylesheet" media="all" />
<link id="fancy-box" href="css/jquery.fancybox.css" rel="stylesheet" media="all" />
<link href="css/prettyPhoto.css" rel="stylesheet" media="all" />
<!-- **Additional - stylesheets** -->
<link href="css/responsive.css" rel="stylesheet" media="all" />
<link href="css/pace-theme-loading-bar.css" rel="stylesheet" media="all" />
<!-- **Font Awesome** -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/flaticon.css">
<!-- **Google - Fonts** -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Roboto:400,300,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Roboto+Condensed:400,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Crete+Round' rel='stylesheet' type='text/css'>
<!-- **Modernizr** -->
<script src="js/modernizr.custom.js"></script>
<script type="text/javascript">
var mytheme_urls = {
stickynav : 'enable'
};
</script>
</head>
<body>
<!--<div id="loader-wrapper">
<div class="loader">
<span class="glyph-icon flaticon-man159"></span>
</div>
</div>-->
<!-- **Wrapper** -->
<div class="wrapper">
<div class="inner-wrapper">
<!-- header-wrapper starts here -->
<div id="header-wrapper">
<header id="header">
<!-- Top bar starts here -->
<div class="top-bar">
<div class="container">
<div class="dt-sc-contact-info">
<p><i class="fa fa-phone"></i>Any Questions? Call Us: <span>966 1 4836060</span></p>
</div>
<!-- <div class="top-right">
<ul>
<li><a title="Login" href="login.html"><span class="fa fa-sign-in"></span>Member Login</a></li>
<li><a title="Register Now" href="register.html"><span class="fa fa-user"></span> Register </a></li>
</ul>
</div>-->
</div>
</div>
<!-- Top bar ends here -->
<div class="main-menu-container">
<div class="main-menu">
<div id="logo"> <a title="Travel" href="index.html"><img title="Fitness" alt="Fitness" src="images/logo.png"></a> </div>
<div id="primary-menu">
<div class="dt-menu-toggle" id="dt-menu-toggle">Menu<span class="dt-menu-toggle-icon"></span></div>
<nav id="main-menu">
<ul id="menu-main-menu" class="menu">
<li class="menu-item-simple-parent menu-item-depth-0">Home </li>
<li class="menu-item-megamenu-parent megamenu-4-columns-group menu-item-depth-0"> About Us
</li>
<li class="menu-item-simple-parent menu-item-depth-0">Our Services
<ul class="sub-menu">
<li> Cosmetic Dentistry </span> </span> </li>
<li> Dental Implants </span> </span> </li>
<li> Periodontal Care</span> </span> </li>
<li> Endodontic Treatment </span> </span> </li>
<li> Pediatric Dentistry </span> </span> </li>
<li> Orthodontics </span> </span> </li>
<li> Restorative Dentistry </span> </span> </li>
</ul>
<a class="dt-menu-expand">+</a> </li>
<li class="menu-item-megamenu-parent megamenu-4-columns-group menu-item-depth-0"> Doctors </li>
<li class="menu-item-megamenu-parent megamenu-4-columns-group menu-item-depth-0"> Appoinment </li>
<li class="current_page_item menu-item-megamenu-parent megamenu-4-columns-group menu-item-depth-0"> Gallery </li>
<li class="menu-item-simple-parent menu-item-depth-0">Contact Us
</li>
</ul>
</nav>
</div>
</div>
</div>
</header>
</div>
<!-- header-wrapper ends here -->
<!-- breadcrumb starts here -->
<div class="breadcrumb-wrapper">
<div class="container">
<h1>Gallery</h1>
<div class="breadcrumb">
Home
<span class="default"> </span>
<h4>Gallery</h4>
</div>
</div>
</div>
<!-- breadcrumb ends here -->
<div id="main">
<!-- main-content starts here -->
<div id="main-content">
<section id="primary" class="content-full-width">
<div class="dt-sc-hr-invisible"></div>
<div class="dt-sc-hr-invisible-small"></div>
<div class="container">
<div class="dt-sc-portfolio-container">
<?php
$connection = mysql_connect("localhost", "root", "12345"); // Establishing Connection with Server
$db = mysql_select_db("icareimage");
//MySQL Query to read data
$query = mysql_query("SELECT photo FROM photos WHERE type='gallery'", $connection);
while ($row = mysql_fetch_array($query))
{?>
<div class="portfolio dt-sc-one-third column flexibility games">
<div class="portfolio-thumb">
<?php echo' <img src="images/photos/'.$row["photo"].'"/>'; ?>
<div class="image-overlay">
<div class="fig-content-wrapper">
<div class="fig-overlay">
<p>
</span>
</p>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</section>
</div>
</div>
<!-- support starts here -->
<!-- paralax starts here -->
<div class="fullwidth-section full-man">
<div class="container">
<div class="dt-sc-one-half column first animate" data-animation="fadeInUp" data-delay="100">
<h3 class="section-title">Make an Appointment</h3>
<div id="ajax_contact_msg"></div>
<form name="frmcontact" action="#" method="post" id="contact-form">
<div class="dt-sc-one-half column first">
<input type="text" name="txtname" placeholder="Enter name..." required>
</div>
<div class="dt-sc-one-half column">
<input type="email" name="txtemail" placeholder="Enter email..." required>
</div>
<div class="dt-sc-one-half column first">
<input type="text" name="txtname" placeholder="Enter Phone..." required>
</div>
<div class="dt-sc-one-half column">
<input type="email" name="txtemail" placeholder="Select Date..." required>
</div>
<div class="clear"></div>
<div class="selection-box">
<select name="cmbsubject">
<option value="Ask a Question?">Select Treatment</option>
<option value="">Cosmetic Dentistry</option>
<option value="">Dental Implants</option>
<option value="">Periodontal Care</option>
<option value="">Endodontic Treatment</option>
<option value="">Pediatric Dentistry</option>
<option value="">Orthodontics</option>
<option value="">Restorative Dentistry</option>
</select>
</div>
<div class="clear"></div>
<div class="selection-box">
<select name="cmbsubject">
<option value="Ask a Question?">What time you would like to come in</option>
<option value="">Morning</option>
<option value="">Afternoon</option>
<option value="">Evening</option>
</select>
</div>
<textarea name="txtmessage" placeholder="Type your queries..." required></textarea>
<input type="submit" name="submit" value="Submit Query">
</form>
</div>
<div class="dt-sc-one-half column"> <img src="images/man.png" alt="" title="" class="aligncenter"> </div>
</div>
</div>
<!-- paralax ends here -->
</section>
</div>
<!-- Team starts here -->
</div>
<!-- Team ends here -->
<!-- main-content ends here -->
</div>
<div class="dt-sc-hr-invisible-medium"></div>
<!-- footer starts here -->
<footer id="footer">
<div class="footer-widgets-wrapper">
<div class="container">
<div class="column dt-sc-one-fourth first">
<aside class="widget widget_text">
<div class="textwidget">
<h3 class="widgettitle"><span class="fa fa-user"></span>About Us</h3>
<p>The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, making it look like readable English. </p>
<p>The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters</p>
</div>
</aside>
</div>
<div class="column dt-sc-one-fourth">
<aside class="widget widget_text">
<h3 class="widgettitle"><span class="fa fa-link"></span>Ouick Links</h3>
<div class="textwidget">
<ul>
<li>Home</li>
<li>About Us</li>
<li>Services</li>
<li>Appoinment</li>
<li>Galery</li>
<li>Contact Us</li>
</ul>
</div>
</aside>
</div>
<div class="column dt-sc-one-fourth">
<aside class="widget widget_text">
<h3 class="widgettitle"><span class="fa fa-link"></span>Our Services</h3>
<div class="textwidget">
<ul>
<li>Cosmetic Dentistry</li>
<li>Dental Implants</li>
<li>Periodontal Care</li>
<li>Endodontic Treatment</li>
<li>Pediatric Dentistry</li>
<li> Orthodontics </span> </span> </li>
<li> Restorative Dentistry </span> </span> </li>
</ul>
</div>
</aside>
</div>
<div class="column dt-sc-one-fourth">
<aside class="widget widget_recent_entries">
<h3 class="widgettitle"><span class="fa fa-calendar"></span>Contact Us</h3>
<!-- <div class="recent-posts-widget">
<ul>
<li> <img src="images/blog-thumb.jpg" alt="" title="">
<h4>Training with Dumbell</h4>
<div class="entry-metadata">
<p class="date">26 May 2014</p>
</div>
</li>
<li> <img src="images/blog-thumb1.jpg" alt="" title="">
<h4>Create the Adonis Effect</h4>
<div class="entry-metadata">
<p class="date">24 May 2014</p>
</div>
</li>
</ul>
</div>-->
<div class="textwidget">
<p>Image Dental clinic<br/>
Riyadh - Specialist Street<br/>
Tel : +966 1 4836060<br/>
Fax : +966 1 483770<br/>
</p>
</div>
</aside>
</div>
</div>
<div class="social-media-container">
<div class="social-media">
<div class="container">
<div class="dt-sc-contact-info dt-phone">
<p><i class="fa fa-phone"></i> <span>966 1 4836060</span> </p>
</div>
<ul class="dt-sc-social-icons">
<li class="facebook"></li>
<li class="google"></li>
<li class="twitter"></li>
<li class="youtube"></li>
<li class="rss"></li>
</ul>
</div>
</div>
</div>
</div>
<div class="copyright">
<div class="container">
<ul class="footer-links">
<li> About Us </li>
<li> Services </li>
<li> Contact Us </li>
</ul>
<p>© 2015 - Image Dental Clinic</p>
</div>
</div>
</footer>
</body>
</html>
//using image name
mysql_connect("localhost","xxxx","xxxxxxx");
mysql_select_db("wellho");
$image = stripslashes($_REQUEST[imname]);
$rs = mysql_query("select * from im_library where filename=\"".
addslashes($image).".jpg\"");
$row = mysql_fetch_assoc($rs);
$imagebytes = $row[imgdata];
header("Content-type: image/jpeg");
print $imagebytes;
//using image Id
include 'inc/db.php';
$id = addslashes($_REQUEST['id']);
$image = mysql_query("SELECT image FROM sites WHERE id = '$id'");
$image = mysql_fetch_assoc($image);
$image = $image['image'];
header("Content-type: image/png");
echo $image;
$query = mysql_query("SELECT * FROM table_name WHERE id={$id}");
$result = mysql_fetch_array($query);
echo "<img src='images/$result["image_columnname"]' />";

syntax error, unexpected $end in C:\xampp\... on line 161 [duplicate]

This question already has answers here:
Reference - What does this error mean in PHP?
(38 answers)
Closed 8 years ago.
I get the following error when I open the index page:
Parse error: syntax error, unexpected $end in C:\xampp\htdocs\... on
line 161
Here is the code:
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<title>
<?php
/*
* Print the <title> tag based on what is being viewed.
*/
global $page, $paged;
wp_title( '|', true, 'right' );
// Add the blog name.
bloginfo( 'name' );
// Add the blog description for the home / front page.
$site_description = get_bloginfo( 'description', 'display' );
if( $site_description && ( is_home() || is_front_page() ) )
echo " | $site_description";
// Add a page number if necessary:
if( $paged >= 2 || $page >= 2 )
echo ' | ' . sprintf( __( 'Page %s', 'bootstrapwp' ), max( $paged, $page ) );
?>
</title>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php
if( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="icon.jpg">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php bloginfo( 'template_url' );?>/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php bloginfo( 'template_url' );?>/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php bloginfo( 'template_url' );?>/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="<?php bloginfo( 'template_url' );?>/ico/apple-touch-icon-57-precomposed.png">
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<?php wp_head(); ?>
<?php include 'storeclass.php'; ?>
<style>
.navbar .nav li a
{
padding-right: 0px !important;
}
</style>
<?php
if( function_exists( 'teboAnalytic' ) ){
teboAnalytic();
}
?>
</head>
<?php
if($detect->isMobile() AND !$detect->isTablet()){
?>
<style>
.container
{
max-width: 300px;
}
</style>
<body style="background-color: #E7EBF2;padding-top:65px;" <?php body_class(); ?> data-spy="scroll" data-target=".bs-docs-sidebar" data-offset="10">
<?php
}
else
{
?>
<body style="background-color: #E7EBF2;padding-top:45px;" <?php body_class(); ?> data-spy="scroll" data-target=".bs-docs-sidebar" data-offset="10">
<?php
} ?>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container" style="width:940px;">
<ul class="nav">
<li class="hidden-phone">
<img src="<?php echo BASE_URL.'weblogo.png'; ?>" style="width:270px;">
</li>
<?php
if($detect->isMobile() AND !$detect->isTablet()){
?>
<li class="dropdown" style="margin-left:15px;">
<?php
}
else
{
?>
<li class="dropdown offset2">
<?php
} ?>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="padding:0;">
<img src="<?php echo BASE_URL; ?>callus.png" style="height:46px;width:203px">
</a>
<?php
if($detect->isMobile() AND !$detect->isTablet()){
callUsBanner('mobile');
}
else
{
callUsBanner('desktop');
}
?>
</li><!-- Regular Menu Ends -->
<li class="divider-vertical">
</li>
</ul>
</div>
</div>
</div>
<?php
if($detect->isMobile() AND !$detect->isTablet()){
?>
<link rel="stylesheet" href="mobile-custom.css" />
<style>
.hhd
{
display: inline-block;
height: 5px;
width: 100%;
}
</style>
<?php
} ?>
<div class="container hhd" style="height:41px;">
<?php
if($detect->isMobile() AND !$detect->isTablet()){
?>
<img src="weblogo.png" style="width:270px;">
<div class="row">
<div class="styled-select blue semi-square divsel span12">
<?php menu1(); ?>
</div>
</div>
<?
} ?>
<div class="subnavbar navbar navbar hidden-phone">
<div class="navbar-inner subnav">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar">
</span>
<span class="icon-bar">
</span>
<span class="icon-bar">
</span>
</button>
<ul class="nav" style="font-size:13px;">
<li class="hidden-phone">
<img src="badge.jpg" style="width:40px;">
</li>
<li class="hidden-phone">
<a href="" style="padding-right: 5px;">
<i class="icon-home">
</i>Home
</a>
</li>
<li class="hidden-phone">
<a href="">
<i class=" icon-th-large">
</i>Store
</a>
</li>
<li class="hidden-phone">
<a href="">
<i class=" icon-tag">
</i>Bursa
</a>
</li>
<li class="divider-vertical subnav">
</li>
<?php menuIjo('desktop','top'); ?>
</ul>
</div>
</div>
</div>
</div>
<script>
$('.renav').click(function(e)
{
//alert('ha');
$('section.dropdown-menu *').removeAttr('data-toggle');
});
</script>
<!-- End Header -->
<!-- Begin Template Content -->
could you help me to solve this problem?
thanks
replace
<? with <?php on line number 132 ( <? } ?> to <?php } ?>
the correct code will be
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<title><?php
/*
* Print the <title> tag based on what is being viewed.
*/
global $page, $paged;
wp_title( '|', true, 'right' );
// Add the blog name.
bloginfo( 'name' );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
echo " | $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
echo ' | ' . sprintf( __( 'Page %s', 'bootstrapwp' ), max( $paged, $page ) );
?></title>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="icon.jpg">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php bloginfo( 'template_url' );?>/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php bloginfo( 'template_url' );?>/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php bloginfo( 'template_url' );?>/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="<?php bloginfo( 'template_url' );?>/ico/apple-touch-icon-57-precomposed.png">
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<?php wp_head(); ?>
<?php include 'storeclass.php'; ?>
<style>
.navbar .nav li a{
padding-right: 0px !important;
}
</style>
<?php
if ( function_exists( 'teboAnalytic' ) ) {
teboAnalytic();
}
?>
</head>
<?php if ($detect->isMobile() AND !$detect->isTablet()) {?>
<style>
.container{
max-width:300px;
}
</style>
<body style="background-color: #E7EBF2;padding-top:65px;" <?php body_class(); ?> data-spy="scroll" data-target=".bs-docs-sidebar" data-offset="10">
<?php }else{?>
<body style="background-color: #E7EBF2;padding-top:45px;" <?php body_class(); ?> data-spy="scroll" data-target=".bs-docs-sidebar" data-offset="10">
<?php } ?>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container" style="width:940px;">
<ul class="nav">
<li class="hidden-phone">
<img src="<?php echo BASE_URL.'weblogo.png'; ?>" style="width:270px;">
</li>
<?php if ($detect->isMobile() AND !$detect->isTablet()) {?>
<li class="dropdown" style="margin-left:15px;">
<?php }else{ ?>
<li class="dropdown offset2">
<?php } ?>
<img src="<?php echo BASE_URL; ?>callus.png" style="height:46px;width:203px">
<?php if ($detect->isMobile() AND !$detect->isTablet()) {
callUsBanner('mobile');
}else{
callUsBanner('desktop');
}
?>
</li><!-- Regular Menu Ends -->
<li class="divider-vertical"></li>
</ul>
</div>
</div>
</div>
<?php if ($detect->isMobile() AND !$detect->isTablet()) {?>
<link rel="stylesheet" href="mobile-custom.css" />
<style>
.hhd{
display:inline-block;
height:5px;
width:100%;
}
</style>
<?php } ?>
<div class="container hhd" style="height:41px;">
<?php if ($detect->isMobile() AND !$detect->isTablet()) {?>
<img src="weblogo.png" style="width:270px;">
<div class="row">
<div class="styled-select blue semi-square divsel span12">
<?php menu1(); ?>
</div>
</div>
<?php } ?>
<div class="subnavbar navbar navbar hidden-phone">
<div class="navbar-inner subnav">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<ul class="nav" style="font-size:13px;">
<li class="hidden-phone"><img src="badge.jpg" style="width:40px;"></li>
<li class="hidden-phone"><i class="icon-home"></i>Home</li>
<li class="hidden-phone"><i class=" icon-th-large"></i>Store</li>
<li class="hidden-phone"><i class=" icon-tag"></i>Bursa</li>
<li class="divider-vertical subnav"></li>
<?php menuIjo('desktop','top'); ?>
</ul>
</div>
</div>
</div>
</div>
<script>
$('.renav').click(function(e){
//alert('ha');
$('section.dropdown-menu *').removeAttr('data-toggle');
});
</script>
<!-- End Header -->
<!-- Begin Template Content -->

Php file renders blank after being converted with Haml (Ruby)!

In order to test if the converted index.haml would work on with my wamp and localhost i did the following:
First, I renamed my index.php into index.html
Then, I typed html2haml index.html index.haml in the command line
Then, I typed haml index.haml indexnew.html in the command line
I renamed indexnew.html to indexnew.php
I tested it: localhost/projects/cross-browser/base0.9/indexnew.php
but the indexnew.php was rendered blank even if the code inside is ok:
Original Php (index.php):
<?php
include_once 'localization.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
<title>Alex Chen - Web Development, Graphic Design, and Translation</title>
<link rel="stylesheet" type="text/css" href="styles/reset.css" />
<link rel="stylesheet" type="text/css" href="styles/global.css" />
<link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.3.1.css" />
<?php if($lang_file=='lang.zh-tw.php' || $lang_file=='lang.zh-cn.php') {echo '<link rel="stylesheet" type="text/css" href="styles/chinese.css" />';} ?>
<script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="scripts/jquery.validate.js"></script>
<script type="text/javascript" src="fancybox/jquery.fancybox-1.3.1.pack.js"></script>
<script type="text/javascript" src="scripts/jquery.scrollTo-min.js"></script>
<script type="text/javascript" src="scripts/jquery.localscroll-min.js"></script>
<script type="text/javascript" src="scripts/custom.js"></script>
<?php if($lang_file=='lang.en.php') {echo '<script type="text/javascript" src="scripts/jquery-validate/val-en.js"></script>';} ?>
<?php if($lang_file=='lang.es.php') {echo '<script type="text/javascript" src="scripts/jquery-validate/val-es.js"></script>';} ?>
<?php if($lang_file=='lang.zh-tw.php') {echo '<script type="text/javascript" src="scripts/jquery-validate/val-zh-tw.js"></script>';} ?>
<?php if($lang_file=='lang.zh-cn.php') {echo '<script type="text/javascript" src="scripts/jquery-validate/val-zh-cn.js"></script>';} ?>
</head>
<body id="home">
<div id="header">
<div class="container">
<div id="banner">
<ul id="lang">
<li <?php if($lang_file=='lang.en.php') {echo 'class="current"';} ?>>ENGLISH</li>
<li <?php if($lang_file=='lang.es.php') {echo 'class="current"';} ?>><?php echo l('nav_a0'); ?></li>
<li <?php if($lang_file=='lang.zh-tw.php') {echo 'class="current"';} ?>><?php echo l('nav_a1'); ?></li>
<li <?php if($lang_file=='lang.zh-cn.php') {echo 'class="current"';} ?>><?php echo l('nav_a2'); ?></li>
</ul>
<div id="logo">
<h1><a>ALEXCHEN</a></h1>
</div>
<div id="logo2">
<ul id="nav">
<li><?php echo l('nav1'); ?></li>
<li><?php echo l('nav2'); ?></li>
</ul>
</div>
<div id="logo3">
</div>
</div><!-- #header-bottom -->
</div><!-- .container -->
</div><!-- #header -->
<div id="content">
<div class="container">
<div class="showcase">
<div class="first">
<div id="nopic">
<p><?php echo l('tagline_p'); ?></p>
</div>
</div>
<div class="pusher">
<h3><?php echo l('showcase1_h3'); ?></h3>
<p><?php echo l('showcase1_p'); ?></p>
<div class="pic">
<a id="showcase1" href="#inline1"><img src="images/showcase1t.png"/></a>
<div id="inline1">
<img src="images/showcase1.png"/>
studyatbest.com
</div>
</div>
</div>
<div class="pusher">
<h3><?php echo l('showcase2_h3'); ?></h3>
<p><?php echo l('showcase2_p'); ?></p>
<div class="pic">
<a id="showcase2" href="#inline2"><img src="images/showcase2t.png"/></a>
<div id="inline2">
<img src="images/showcase2.png"/>
spacestudios.com
</div>
</div>
</div><!-- .pushed -->
<div class="pusher">
<h3><?php echo l('showcase3_h3'); ?></h3>
<p><?php echo l('showcase3_p'); ?></p>
<div class="pic">
<a id="showcase3" href="#inline3"><img src="images/showcase3t.png"/></a>
<div id="inline3">
<img src="images/showcase3.png"/>
alexchen.com
</div>
</div>
</div>
<div class="pusher">
<h3><?php echo l('showcase4_h3'); ?></h3>
<p><?php echo l('showcase4_p'); ?></p>
<div class="pic">
<a id="showcase4" href="#inline4"><img src="images/showcase4t.png"/></a>
<div id="inline4">
<img src="images/showcase4.png"/>
mattsai.com
</div>
</div>
</div>
<div class="pusher">
<h3><?php echo l('showcase5_h3'); ?></h3>
<p><?php echo l('showcase5_p'); ?></p>
<div class="pic">
<a id="showcase5" href="#inline5"><img src="images/showcase5t.png"/></a>
<div id="inline5">
<img src="images/showcase5.png"/>
mattsai.com
</div>
</div>
</div><!-- .pusher -->
<div class="pusher">
<h3><?php echo l('showcase6_h3'); ?></h3>
<p><?php echo l('showcase6_p'); ?></p>
<div class="pic">
<a id="showcase6" href="#inline6"><img src="images/showcase6t.png"/></a>
<div id="inline6">
<img src="images/showcase6.png"/>
mattsai.com
</div>
</div>
</div>
<div class="pusher">
<h3><?php echo l('showcase8_h3'); ?></h3>
<p><?php echo l('showcase8_p'); ?></p>
<div class="pic">
<a id="showcase8" href="#inline8"><img src="images/showcase8t.png"/></a>
<div id="inline8">
<img src="images/showcase8.png"/>
mattsai.com
</div>
</div>
</div><!-- .pusher -->
</div><!-- .showcase -->
</div><!-- .container -->
</div><!-- #work -->
<div id="footer">
<div class="container">
<div id="footer-top">
<div id="about">
<h3><?php echo l('about_h3'); ?></h3>
<p><?php echo l('about_p'); ?></p>
</div>
<div id="info">
<h3><?php echo l('info_h3'); ?></h3>
<ul>
<li id="tel"><?php echo l('_info_li2'); ?><p>Tel:</p> 0918051170</li>
<li id="gmail"><?php echo l('_info_li3'); ?><p></p>alexchen.net#gmail.com</li>
<li id="facebook"><?php echo l('_info_li4'); ?> facebook</li>
</ul>
</div>
<div id="contact">
<h3><?php echo l('contact_h3'); ?></h3>
<p><?php echo l('_contact_p'); ?></p>
<form id="sendmail" method="post" action="http://www.emailmeform.com/fid.php?formid=254816">
<label for="name"><?php echo l('form_label1'); ?></label>
<input type="text" id="name" name="FieldData0" />
<label for="email"><?php echo l('form_label2'); ?></label>
<input type="text" id="email" name="FieldData1" />
<label for="message"><?php echo l('form_label3'); ?></label>
<textarea type="text" id="message" name="FieldData2"></textarea>
<input id="button" type="submit" value="<?php echo l('submit'); ?>">
</form>
</div>
</div><!-- #footer-top -->
<div id="footer-bottom">
<p>Copyright © 2010 Alex Chen. All Rights Reserved. Hosted on Zymic. Contact form hosted on Email Me Form.<a id="nr" href="http://www.freedomain.co.nr/cheap_web_hosting.php" target="_blank"><img src="http://ruarmza.4u.com.ru/ch.gif" alt="Cheap Web Hosting Providers" width="88" height="31" border="0" /></a></p>
</div>
</div><!-- .container -->
</div><!-- #footer -->
<script type="text/javascript" src="scripts/google-analytics.js"></script>
<script type="text/javascript" src="scripts/page-tracker.js"></script>
</body>
</html>
Converted Php (indexnew.php):
<?php include_once 'localization.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<meta content='IE=EmulateIE7' http-equiv='X-UA-Compatible' />
<title>Alex Chen - Web Development, Graphic Design, and Translation</title>
<link href='styles/reset.css' rel='stylesheet' type='text/css' />
<link href='styles/global.css' rel='stylesheet' type='text/css' />
<link href='fancybox/jquery.fancybox-1.3.1.css' rel='stylesheet' type='text/css' />
<?php if($lang_file=='lang.zh-tw.php' || $lang_file=='lang.zh-cn.php') {echo '<link rel="stylesheet" type="text/css" href="styles/chinese.css" ?>
';} ?>
<script src='scripts/jquery-1.3.2.min.js' type='text/javascript'></script>
<script src='scripts/jquery.validate.js' type='text/javascript'></script>
<script src='fancybox/jquery.fancybox-1.3.1.pack.js' type='text/javascript'></script>
<script src='scripts/jquery.scrollTo-min.js' type='text/javascript'></script>
<script src='scripts/jquery.localscroll-min.js' type='text/javascript'></script>
<script src='scripts/custom.js' type='text/javascript'></script>
<?php if($lang_file=='lang.en.php') {echo '<script type="text/javascript" src="scripts/jquery-validate/val-en.js?>
';} ?>
<?php if($lang_file=='lang.es.php') {echo '<script type="text/javascript" src="scripts/jquery-validate/val-es.js?>
';} ?>
<?php if($lang_file=='lang.zh-tw.php') {echo '<script type="text/javascript" src="scripts/jquery-validate/val-zh-tw.js?>
';} ?>
<?php if($lang_file=='lang.zh-cn.php') {echo '<script type="text/javascript" src="scripts/jquery-validate/val-zh-cn.js?>
';} ?>
</head>
<body id='home'>
<div id='header'>
<div class='container'>
<div id='banner'>
<ul id='lang'>
<li
<?php if($lang_file=='lang.en.php') {echo 'class="current"';} ?>
>
</ul>
<a href='index.php?lang=en'>ENGLISH</a>
<li
<?php if($lang_file=='lang.es.php') {echo 'class="current"';} ?>
>
<a href='index.php?lang=es'>
<?php echo l('nav_a0'); ?>
</a>
<li
<?php if($lang_file=='lang.zh-tw.php') {echo 'class="current"';} ?>
>
<a href='index.php?lang=zh-tw'>
<?php echo l('nav_a1'); ?>
</a>
<li
<?php if($lang_file=='lang.zh-cn.php') {echo 'class="current"';} ?>
>
<a href='index.php?lang=zh-cn'>
<?php echo l('nav_a2'); ?>
</a>
<div id='logo'>
<h1>
<a>ALEXCHEN</a>
</h1>
</div>
<div id='logo2'>
<ul id='nav'>
<li>
<a href='#content'>
<?php echo l('nav1'); ?>
</a>
</li>
<li>
<a href='#contact'>
<?php echo l('nav2'); ?>
</a>
</li>
</ul>
</div>
<div id='logo3'></div>
</div>
<!-- #header-bottom -->
</div>
<!-- .container -->
</div>
<!-- #header -->
<div id='content'>
<div class='container'>
<div class='showcase'>
<div class='first'>
<div id='nopic'>
<p>
<?php echo l('tagline_p'); ?>
</p>
</div>
</div>
<div class='pusher'>
<h3>
<?php echo l('showcase1_h3'); ?>
</h3>
<p>
<?php echo l('showcase1_p'); ?>
</p>
<div class='pic'>
<a href='#inline1' id='showcase1'>
<img src='images/showcase1t.png' />
</a>
<div id='inline1'>
<img src='images/showcase1.png' />
<a href='http://studyatbest.com'>studyatbest.com</a>
</div>
</div>
</div>
<div class='pusher'>
<h3>
<?php echo l('showcase2_h3'); ?>
</h3>
<p>
<?php echo l('showcase2_p'); ?>
</p>
<div class='pic'>
<a href='#inline2' id='showcase2'>
<img src='images/showcase2t.png' />
</a>
<div id='inline2'>
<img src='images/showcase2.png' />
<a href='http://studyatbes.com'>spacestudios.com</a>
</div>
</div>
</div>
<!-- .pushed -->
<div class='pusher'>
<h3>
<?php echo l('showcase3_h3'); ?>
</h3>
<p>
<?php echo l('showcase3_p'); ?>
</p>
<div class='pic'>
<a href='#inline3' id='showcase3'>
<img src='images/showcase3t.png' />
</a>
<div id='inline3'>
<img src='images/showcase3.png' />
<a href='http://studyatbes.com'>alexchen.com</a>
</div>
</div>
</div>
<div class='pusher'>
<h3>
<?php echo l('showcase4_h3'); ?>
</h3>
<p>
<?php echo l('showcase4_p'); ?>
</p>
<div class='pic'>
<a href='#inline4' id='showcase4'>
<img src='images/showcase4t.png' />
</a>
<div id='inline4'>
<img src='images/showcase4.png' />
<a href='http://studyatbes.com'>mattsai.com</a>
</div>
</div>
</div>
<div class='pusher'>
<h3>
<?php echo l('showcase5_h3'); ?>
</h3>
<p>
<?php echo l('showcase5_p'); ?>
</p>
<div class='pic'>
<a href='#inline5' id='showcase5'>
<img src='images/showcase5t.png' />
</a>
<div id='inline5'>
<img src='images/showcase5.png' />
<a href='http://studyatbes.com'>mattsai.com</a>
</div>
</div>
</div>
<!-- .pusher -->
<div class='pusher'>
<h3>
<?php echo l('showcase6_h3'); ?>
</h3>
<p>
<?php echo l('showcase6_p'); ?>
</p>
<div class='pic'>
<a href='#inline6' id='showcase6'>
<img src='images/showcase6t.png' />
</a>
<div id='inline6'>
<img src='images/showcase6.png' />
<a href='http://studyatbes.com'>mattsai.com</a>
</div>
</div>
</div>
<div class='pusher'>
<h3>
<?php echo l('showcase8_h3'); ?>
</h3>
<p>
<?php echo l('showcase8_p'); ?>
</p>
<div class='pic'>
<a href='#inline8' id='showcase8'>
<img src='images/showcase8t.png' />
</a>
<div id='inline8'>
<img src='images/showcase8.png' />
<a href='http://studyatbes.com'>mattsai.com</a>
</div>
</div>
</div>
<!-- .pusher -->
</div>
<!-- .showcase -->
</div>
<!-- .container -->
</div>
<!-- #work -->
<div id='footer'>
<div class='container'>
<div id='footer-top'>
<div id='about'>
<h3>
<?php echo l('about_h3'); ?>
</h3>
<p>
<?php echo l('about_p'); ?>
</p>
</div>
<div id='info'>
<h3>
<?php echo l('info_h3'); ?>
</h3>
<ul>
<li id='tel'>
<?php echo l('_info_li2'); ?>
<p>Tel:</p>
0918051170
</li>
<li id='gmail'>
<?php echo l('_info_li3'); ?>
<p></p>
<a href='mailto:janoochen#gmail.com'>alexchen.net#gmail.com</a>
</li>
<li id='facebook'>
<?php echo l('_info_li4'); ?>
<a href='http://www.facebook.com/weedd.chen'>facebook</a>
</li>
</ul>
</div>
<div id='contact'>
<h3>
<?php echo l('contact_h3'); ?>
</h3>
<p>
<?php echo l('_contact_p'); ?>
</p>
<form action='http://www.emailmeform.com/fid.php?formid=254816' id='sendmail' method='post'>
<label for='name'>
<?php echo l('form_label1'); ?>
</label>
<input id='name' name='FieldData0' type='text' />
<label for='email'>
<?php echo l('form_label2'); ?>
</label>
<input id='email' name='FieldData1' type='text' />
<label for='message'>
<?php echo l('form_label3'); ?>
</label>
<textarea id='message' name='FieldData2' type='text'></textarea>
<input id='button' type='submit' value="<?php echo l('submit'); ?>" />
</form>
</div>
</div>
<!-- #footer-top -->
<div id='footer-bottom'>
<p>
Copyright © 2010 Alex Chen. All Rights Reserved. Hosted on
<a href='http://www.zymic.com'>Zymic</a>.
Contact form hosted on
<a href='http://www.emailmeform.com'>Email Me Form</a>.
<a href='http://www.freedomain.co.nr/cheap_web_hosting.php' id='nr' target='_blank'>
<img alt='Cheap Web Hosting Providers' border='0' height='31' src='http://ruarmza.4u.com.ru/ch.gif' width='88' />
</a>
</p>
</div>
</div>
<!-- .container -->
</div>
<!-- #footer -->
<script src='scripts/google-analytics.js' type='text/javascript'></script>
<script src='scripts/page-tracker.js' type='text/javascript'></script>
</body>
</html>
Any suggestions?
I'd suggest you try a PHP-specific version of HAML, like PHPHaml or pHAML. The Ruby HAML interpreter is specifically expecting Ruby code, and will likely screw up your PHP syntax.
Having said that, I have used Chaml with some degree of success. HAML for PHP is at a rather experimental stage, and you will come across bugs. If you're writing more HTML than PHP though, it can be a great help.

Categories