FreewayTalk
3 replies to this thread. Most Recent
BigG
10 Mar 2010, 1:44 pm
php insert
I have a .php page. My coder has given me a lump of code and I have inserted a markup item into an expandable div
The coder has shown me the page working on its own, but when I paste in the code to the page itself, an error gets thrown up.
The page is here
http://jordanacoustics.co.uk/products_ng3.php
And this is the page without the code in
http://jordanacoustics.co.uk/products_nocode.php I am attempting to paste the code in just above the footer.
And this is the code
http://jordanacoustics.co.uk/code.html
I’m not expecting anyone to trawl through the code, but is there anything obvious that I may be doing wrong that my frazzled brain cannot pick up?
Nathan Garner Creative Director
Austin Wells Design Limited One Elmgate Drive - Littledown - Bournemouth BH7 7EF t 01202 301271 e email@hidden w http://www.austinwellsdesign.co.uk
waltd
10 Mar 2010, 3:02 pmAre you pasting all of the PHP directly into the Markup Item itself, or do you have this PHP code in an external file that you are pulling into your page with require() or include()?
If so, you might be hitting the limit of Markup Items as far as text length goes. I don’t recall what this limit is, but it’s not high.
This particular PHP error means you have failed to close the preceding line with a ; or a }, or have incorrectly nested parentheses that cause the interpreter to get lost and maybe close the line before you meant to. Preview the page from Freeway into BBEdit or another programmer’s text editor, turn on line numbers, and see what is on line 374. That’s where the error most likely is.
Walter
On Mar 10, 2010, at 9:44 AM, Nathan Garner wrote:
I have a .php page. My coder has given me a lump of code and I have inserted a markup item into an expandable div
The coder has shown me the page working on its own, but when I paste in the code to the page itself, an error gets thrown up.
The page is here
http://jordanacoustics.co.uk/products_ng3.php
And this is the page without the code in
http://jordanacoustics.co.uk/products_nocode.php I am attempting to paste the code in just above the footer.
And this is the code
http://jordanacoustics.co.uk/code.html
I’m not expecting anyone to trawl through the code, but is there anything obvious that I may be doing wrong that my frazzled brain cannot pick up?
Nathan Garner Creative Director
Austin Wells Design Limited One Elmgate Drive - Littledown - Bournemouth BH7 7EF t 01202 301271 e email@hidden w http://www.austinwellsdesign.co.uk
Freeway user since 1997
BigG
10 Mar 2010, 3:09 pmAha… thanks Walter.
I am pasting it all in the mark-up. Maybe I should be pulling it in from an external file then. What would be the best route to pull it in then Walter?
Nathan Garner Creative Director
Austin Wells Design Limited One Elmgate Drive - Littledown - Bournemouth BH7 7EF t 01202 301271 e email@hidden w http://www.austinwellsdesign.co.uk
Member of NAPP | Zen Affiliate | Dorset Business Member | YEC
On 10 Mar 2010, at 16:02, Walter Lee Davis wrote:
Are you pasting all of the PHP directly into the Markup Item itself, or do you have this PHP code in an external file that you are pulling into your page with require() or include()?
If so, you might be hitting the limit of Markup Items as far as text length goes. I don’t recall what this limit is, but it’s not high.
This particular PHP error means you have failed to close the preceding line with a ; or a }, or have incorrectly nested parentheses that cause the interpreter to get lost and maybe close the line before you meant to. Preview the page from Freeway into BBEdit or another programmer’s text editor, turn on line numbers, and see what is on line 374. That’s where the error most likely is.
Walter
On Mar 10, 2010, at 9:44 AM, Nathan Garner wrote:
I have a .php page. My coder has given me a lump of code and I have inserted a markup item into an expandable div
The coder has shown me the page working on its own, but when I paste in the code to the page itself, an error gets thrown up.
The page is here
http://jordanacoustics.co.uk/products_ng3.php
And this is the page without the code in
http://jordanacoustics.co.uk/products_nocode.php I am attempting to paste the code in just above the footer.
And this is the code
http://jordanacoustics.co.uk/code.html
I’m not expecting anyone to trawl through the code, but is there anything obvious that I may be doing wrong that my frazzled brain cannot pick up?
Nathan Garner Creative Director
Austin Wells Design Limited One Elmgate Drive - Littledown - Bournemouth BH7 7EF t 01202 301271 e email@hidden w http://www.austinwellsdesign.co.uk
waltd
10 Mar 2010, 3:19 pmMake a text file (or use the one you have) called whatever.php or
whatever.inc.php (that’s just a convention, it doesn’t mean anything
in particular, it just reminds you what the file is for). Put all the
code in it, make sure that it starts and ends with the php tags <?
php ?>.
Upload this file to your server, at the same level as the Freeway page which will consume it.
In your markup item, just put in one line:
<?php require('whatever.inc.php'); ?>
(Obviously change that whatever to what you actually call the thing.)
And upload your Freeway file to the server to see the result. If it works, then great. If it doesn’t, then you have isolated the problem to the PHP file, and if you paste that at http://Pastie.org, we can see it in its raw state and make comments on it in isolation.
Walter
On Mar 10, 2010, at 11:09 AM, Nathan Garner wrote:
Aha… thanks Walter.
I am pasting it all in the mark-up. Maybe I should be pulling it in from an external file then. What would be the best route to pull it in then Walter?
Nathan Garner Creative Director
Austin Wells Design Limited One Elmgate Drive - Littledown - Bournemouth BH7 7EF t 01202 301271 e email@hidden w http://www.austinwellsdesign.co.uk
Member of NAPP | Zen Affiliate | Dorset Business Member | YEC
On 10 Mar 2010, at 16:02, Walter Lee Davis wrote:
Are you pasting all of the PHP directly into the Markup Item itself, or do you have this PHP code in an external file that you are pulling into your page with require() or include()?
If so, you might be hitting the limit of Markup Items as far as text length goes. I don’t recall what this limit is, but it’s not high.
This particular PHP error means you have failed to close the preceding line with a ; or a }, or have incorrectly nested parentheses that cause the interpreter to get lost and maybe close the line before you meant to. Preview the page from Freeway into BBEdit or another programmer’s text editor, turn on line numbers, and see what is on line 374. That’s where the error most likely is.
Walter
On Mar 10, 2010, at 9:44 AM, Nathan Garner wrote:
I have a .php page. My coder has given me a lump of code and I have inserted a markup item into an expandable div
The coder has shown me the page working on its own, but when I paste in the code to the page itself, an error gets thrown up.
The page is here
http://jordanacoustics.co.uk/products_ng3.php
And this is the page without the code in
http://jordanacoustics.co.uk/products_nocode.php I am attempting to paste the code in just above the footer.
And this is the code
http://jordanacoustics.co.uk/code.html
I’m not expecting anyone to trawl through the code, but is there anything obvious that I may be doing wrong that my frazzled brain cannot pick up?
Nathan Garner Creative Director
Austin Wells Design Limited One Elmgate Drive - Littledown - Bournemouth BH7 7EF t 01202 301271 e email@hidden w http://www.austinwellsdesign.co.uk
Freeway user since 1997
