My Java Script executes fine on an test HTML page, but on the required page which is php results in an error. the page
The script drops in message box when the page is loaded
since the script works the problemshould lie elsewhere.. - line 451
-
<div id="dropin" style="LEFT: 200px; VISIBILITY: hidden; WIDTH: 500px; POSITION: absolute; TOP: 100px; HEIGHT: 100px; BACKGROUND-COLOR: #ccccff">
-
more...html code.....
-
-
<div align="right"><a onclick="dismissbox();return false" href="#">[Close Box] </a></div>
-
</td></li>
-
</tr></tbody></table></td></tr></table>
-
-
</div>
-
-
-
</body>
-
</html>
-
-
include(PMDROOT.'/includes/template_setup.php');
-
?>
-
The error results in Parse error: parse error, unexpected '<' in line 451 which opens the div.
I cannot figure out what is missing and any suggestions would be appreciated.
thanks
14 2588
Heya, dbldeegd. Welcome to TSDN!
Let's have a look at your PHP code.
Heya, dbldeegd. Welcome to TSDN!
Let's have a look at your PHP code.
Thanks pbmods.
The code is fairly lengthy....
and includes
$custom javascript .='
(PMDROOT.'/includes/template_setup.php');
?>
the problem is where should the JS be placed?? here is what should happen.
I couls send an attachment
Heya, dbldeegd.
Are you trying to store the HTML into a string, or do you want to output the HTML directly?
You can't leave a string unterminated and then append HTML output. In other words, this won't work: -
$html = 'Some HTML; notice that this string isn\'t terminated yet:
-
?>
-
<html code goes here.>
-
<?php
-
';
-
?>
-
Instead, try something like this: -
$html = <<<HTML
-
<html code goes here.>
-
HTML;
-
Or better yet: -
$html = file_get_contents('theHtmlFile.html');
-
Heya, dbldeegd.
Are you trying to store the HTML into a string, or do you want to output the HTML directly?
You can't leave a string unterminated and then append HTML output. In other words, this won't work: -
$html = 'Some HTML; notice that this string isn\'t terminated yet:
-
?>
-
<html code goes here.>
-
<?php
-
';
-
?>
-
Instead, try something like this: -
$html = <<<HTML
-
<html code goes here.>
-
HTML;
-
Or better yet: -
$html = file_get_contents('theHtmlFile.html');
-
I did not realise how busy this board is..
I have moved the html file but still some problem with syntax of this code -
$html=file_get_contents('user register.html');';
-
include(PMDROOT.'/includes/template_setup.php');
-
?>
results in
Parse error: parse error, unexpected '\''
the include line is the output line
Heya, dbldeegd.
It looks like your error is inside of template_setup.php.
My head is scrambled trying to figure this out
the output line 372 is include(PMDROOT.'/includes/template_setup.php');
the file /includes/template_setup.php just sets the output which includes several templates.
Is there a different syntax for this $html=file_get?
Heya, dbldeegd.
It looks like your error is inside of template_setup.php.
You have extra '; at the end of the first line
[PHP]$html=file_get_contents('user register.html');';
include(PMDROOT.'/includes/template_setup.php'); [/PHP]
This should be
[PHP]$html=file_get_contents('user register.html');
include(PMDROOT.'/includes/template_setup.php'); [/PHP]
You have extra '; at the end of the first line
Oh, hey. Look at that.
Don't listen to me :P
Oh, hey. Look at that.
Don't listen to me :P
That's why proper code tags are important;). BTW, I always use Dreamwear for such kind of questions.
Heya, dbldeegd.
Thanks for using CODE tags! Did you know that you can specify a language for your CODE tags to make your source code easier to read?
You will still need to use [/code] to close your code blocks, regardless of the language, but you can the use one of these tags to open your code block:
[code=html]
[code=javascript]
[code=php]
and so on.
Thanks!
MODERATOR
Thanks for all the comments
I am still struggling with this
I now receive the parse error
Parse error: parse error, unexpected '\'' in /....../members/user_registest.php on line 372 -
371 $html=file_get_contents('user register.html');
-
372 include(PMDROOT.'/includes/template_setup.php');
-
?>
-
-
-
the page
Should I be looking elsewhere for this?
Heya, dbldeegd.
Thanks for using CODE tags! Did you know that you can specify a language for your CODE tags to make your source code easier to read?
You will still need to use [/code] to close your code blocks, regardless of the language, but you can the use one of these tags to open your code block:
[code=html]
[code=javascript]
[code=php]
and so on.
Thanks!
MODERATOR
Parse error: parse error, unexpected '\'' in /....../members/user_registest.php on line 372
371 [PHP]$html=file_get_contents('user register.html');[/PHP] PHP doesn't like spaces in file names. But your constant could be causing the problem. [PHP]include(PMDROOT.'/includes/template_setup.php');[/PHP]
371 [PHP]$html=file_get_contents('user register.html');[/PHP] PHP doesn't like spaces in file names. But your constant could be causing the problem. [PHP]include(PMDROOT.'/includes/template_setup.php');[/PHP]
The lines have been edited:
[PHP]371 $html=file_get_contents('user_register.html');
372 include(PMDROOT.'/includes/template_setup.php');
?>
[/PHP]
but now the following error is received
Parse error: parse error, unexpected '\'' in /...../econsumersearch/members/user_registest.php on line 372
Why and what is being interpreted as '\" ???
Why and what is being interpreted as '\" ???
The code you posted does not define PMDROOT. As I said in my last post, I suspect the error is in this constant
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Marten van Urk |
last post by:
I got the following error in my page Parse error: parse error,
unexpected T_ELSE in line 25
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Club</title>...
|
by: Janwillem Borleffs |
last post by:
Q: I'm getting an unexpected $ or $end parse/syntax error, what's causing
this?
A: This is caused when an expression is started with an opening brace, but
the closing brace is omitted.
...
|
by: Ehartwig |
last post by:
I recently created a script for user verification, solved my emailing
issues, and then re-created the script in order to work well with the
new PHP 5 that I installed on my server. After...
|
by: bovanshi |
last post by:
got this annoying error
I'm completly new to php... and i have no clue what is wrong here, from what i can tell there is nothing rong with this code... but that isn't what the borwser say :P
...
|
by: redsky |
last post by:
Hi,
I'm getting this error in my code (trying to make a submit button work) and can't figure out what the problem is. Can someone help me?
Parse error: parse error, unexpected T_VARIABLE in...
|
by: Lawrence Krubner |
last post by:
Imagine a template system that works by getting a file, as a string, and
then putting it through eval(), something like this:
$formAsString = $controller->command("readFileAndReturnString",...
|
by: akohistani |
last post by:
I am having Parse error problem with my newly purchased Php upload script I have uploaded the script and I get the error below
Parse error: syntax error, unexpected $end in URL/functions.php on...
|
by: exoduses |
last post by:
Hi,
I was wondering if anyone could help me. This site is for college, and I have everything else working, except for this PHP thingy. This is the error message I get:
Parse error: syntax error,...
|
by: JRough |
last post by:
I'm trying to use output buffering to cheat so i can print to excel
which is called later than this header().
header("Content-type: application/xmsdownload");
header("Content-Disposition:...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |