close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Php Above Html

Thread began 10/31/2012 12:15 am by theorytl401135 | Last modified 10/31/2012 3:15 pm by Jason Byrnes | 1699 views | 11 replies |

theorytl401135

Php Above Html

How can I get php to execute above the HTML in a plugin with Framework Builder.

When I do something as simple as <?php echo('Hello World');?> before the HTML in a plugin and run the page it is included in, nothing happens.

Please advise, thanks.

Sign in to reply to this post

mikehesson45442908

Hello,

What you want to exactly. i can't understand but below link might be helpful to you.


framework-builder_gsg.php

Thanks and Regards,

Mike

Sign in to reply to this post

Jason ByrnesWebAssist

make sure that the page you are using as a plugin is a full html page with <html> <head> and <body> tags in it, for example:

php:
<?php echo('Hello World');?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>

<body>sample Body text
</body>
</html>




the Plugin engine looks for the doctype tag and adds code before the doctype tag to the page it is plugged into before the doctype tag on that page.

it breaks the head and body sections of the page up and adds the code to the respective sections of the main page.

if those tags are missing, then the plugin engine has no way to know what sections the code belongs to.

Sign in to reply to this post

theorytl401135

Thanks for this info Jason.

Sign in to reply to this post

theorytl401135

Hey Jason, I am still not able to see the echo. Are there any other conditions that I should consider?

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of your pages please.

Sign in to reply to this post

theorytl401135

Here you go.

Attached Files
files.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the code for the echo is wrong. you need quotes around the string to echo



php:
<?php echo(test); ?>



will cause an error.


it needs quotes:

php:
<?php echo("test"); ?>
Sign in to reply to this post

theorytl401135

Sorry about that, I was trying it on another page to see if it made a difference and type it wrong. That does not affect anything I'm still not seeing it.

Sign in to reply to this post

Jason ByrnesWebAssist

normally code from above the doctype is not added to the main page.

normal the code above the HTML is used to generate the page body, then the page body is displayed.

why is it you want the code from above the HTML on the header page included?

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...