PHP code disappearing from Muse html
I'm having an odd error that I'm hoping someone can help me with.
I am using Adobe Muse and a server side CMS called Pulsepro. To run the CMS modules all I have to do is paste an embed line like the following:
<?php include("pulsepro/includes/gallery2.php"); ?>
I am placing this php code in an HTML snippet in muse and then exporting and uploading to server. On the server I have an .htaccess file with the following lines of code to make sure that the browser can find the PHP:
AddType application/x-httpd-php .html .htm
AddHandler application/x-httpd-php .html .htm
When I go to my page, where the php should be is blank. Upon viewing source code it shows that the php include is completed deleted and just has a blank DIV. Now, the local file on my machine (the export from Muse) shows the correct php include line. Why is it that when the browser runs the code it removes the php code from the HTML file? If I put the same php line in a simple html file it runs fine.
Help? I've never had this issue with anything other than Muse.
Best,
Oliver
Browsers do not find or process PHP. PHP is found and processed by the server before it hits your browser.
The reason why you may not see anything where you placed the PHP is that it is unable to locate "pulsepro/includes/gallery2.php" or that included PHP file is simply rendering nothing.
What happens when you call "pulsepro/includes/gallery2.php" directly in your browser? Does it display anything?
Similar Messages
-
Hi
My DW CS4 has started to not show php includes in the code view (or design view for that matter!)
They take this form usually -
<?php include($_SERVER['DOCUMENT_ROOT'].'/php-include/nav-left.php'); ?>
However, they are all missing! Is there a setting that has inadvertently changed?
Thanks
GrahamDreamweaver is not capable of interpreting $_SERVER['DOCUMENT_ROOT']. You need to use document-relative links for include files.
-
Firefox 3 displays the php code when pages launched from dreamweaver 8
The problem seems to relate to files opening as —
file:///C:/localweb/ .... when sent from Dreamweaver 8.0 to Firefox
The first html/php page loads correctly from dreamweaver as
processed HTML, a second page linked from either an HTML or php
page also loads correctly, but selecting any link from that or
subsequent pages displays the full php code instead of processed
html layout - so this appears to be a third level or greater
problem.
If I manually substitute -
http://localhost/ — the problem
does not arise.
This is a problem with version 3 of firefox, all previous
versions I used worked fine with both — file:///C:/localweb/
and
http://localhost/
Both prefixes also appear with pure HTML sites, but they load
and function correctly.
Not every php site I have loads with file:///C:/localweb/, so
I am wondering if this relates to something in the php code or
Dreamweaver - I have conn.php set to:
mysql_connect("localhost", "root", "") or die(mysql_error());
I use winxp and have xampp installed - everything worked fine
until I installed Firefox 3> but selecting any link from that or subsequent pages
You are being confused by a) not understanding root relative
vs document
relative links, and b) not understanding how DW previews
files.
If I have a document with a link to an image that looks like
this -
<img src="/images/foo.gif"...
That's what's called a root relative link.
If I preview that document in DW, then the browser gets the
document, sees
the leading "/" and reads that as the root of the hard drive,
since the
browser has no idea where the root of the site is. Thus, the
image is
broken in the preview.
If I have temp files enabled, then DW will secretly convert
the file being
previewed into a temporary file, and hand that to the
browser. This temp
file has had all root relative links converted to document
relative links
(as you will see by looking at the code in the browser), and
has had all
include files actually embedded in the page, and has had all
external CSS
and js markup embedded in the page. In other words, DW has
made the
document into a stand-alone page.
If you do not have temp files enabled, all of these links
would be broken on
preview.
Now - if you are using root relative links, AND you have temp
files enabled,
AND you click away from the previewed document, then all of
your links will
be broken, since DW has not made that linked file into a temp
file. This is
what you are seeing.
So - if you want to click away on preview, then you must use
document
relative links for the site -
<img src="../images/foo.gif"... (for example)
These will still work on preview since the browser knows how
to determine
the current file's location and how to follow that path.
Make sense?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"gbiras" <[email protected]> wrote in
message
news:[email protected]...
> The problem seems to relate to files opening as ?
file:///C:/localweb/
> ....
> when sent from Dreamweaver 8.0 to Firefox
>
> The first html/php page loads correctly from dreamweaver
as processed
> HTML, a
> second page linked from either an HTML or php page also
loads correctly,
> but
> selecting any link from that or subsequent pages
displays the full php
> code
> instead of processed html layout - so this appears to be
a third level or
> greater problem.
>
> If I manually substitute -
http://localhost/ ? the problem does
not arise.
>
> This is a problem with version 3 of firefox, all
previous versions I used
> worked fine with both ? file:///C:/localweb/ and
http://localhost/
>
> Both prefixes also appear with pure HTML sites, but they
load and function
> correctly.
>
> Not every php site I have loads with
file:///C:/localweb/, so I am
> wondering
> if this relates to something in the php code or
Dreamweaver - I have
> conn.php
> set to:
>
> mysql_connect("localhost", "root", "") or
die(mysql_error());
>
> I use winxp and have xampp installed - everything worked
fine until I
> installed Firefox 3
> -
I hope someone can help with this. I'm trying to create a
dynamic site using dreamweaver CS3, with php5 and mysql5 in the
background but I'm having difficulty with recordsets disappearing
from the server behaviour menu when tweaking the code to allow set
characters or set names for utf8.
For a while, I've been having a problem getting my
dynamically generated master list pages (eg lists of jobs) to
display international characters like an accented french e (and
other languages) and for these to display correctly when viewed in
phpmyadmin also. So, I've placed headers at the top of the page for
utf8 and created the content metatag for utf8 in the page code.
Where needed I've added ENT_QUOTES utf etc for htmlentities and
added accept-charset utf-8 in the <form> action area.
(one thing I haven't done in the form action area is add
<enctype="multipart/form-data">, but I'm not sure if this
will make any difference)
In the backend, the innoDB database is collated and built
using utf8_unicode_ci. I'm on a shared host -so can't directly
access php.ini or adjust the connection settings through
phpmyadmin. But I can write .htaccess files (currently with the
defaultcharset set to utf8 also).
At this point - all list pages display the correct characters
when retrieved from the database - indicating that the headers are
working. But - in phpmyadmin the letters are garbled, and garbled
on return on update forms (content management). I solved this by
adding the &#xxxx; equivalents in insert and update forms to
display the text correctly on the list pages - but again it's not
convenient to see all of this in phpmyadmin, as I'd like to be able
to read it there as it should be, and to dispense with the need to
add &#xxxx references on the insert and update forms.
So...a bit of searching, and I read that in order for the
international characters to display in phpmyadmin correctly, I
needed to amend my php page code so that for all instances where I
see the connection to the database, before the SELECT, INSERT and
DELETE queries, I need to add either mysql_set_charset('utf8',
$connection) or use three lines of code referencing mysql_query SET
NAMES, SET CHARACTER SET and SET COLLATION_CONNECTION for utf8.
I did that, and it removed all of my recordsets in the
sidebar menu! Not too good. I'm left with a task of rebuilding
pages now.
So I placed the mysql_set_charset line in the connection.php
file in the DW Connections folder below the connection there
instead. [I didn't precede the mysql etc line with a $ sign - I
wonder if that's the issue?]
With this change I could use the Insert forms to add the
international characters directly into the database and see through
phpmyadmin that all was hunky dory. But then the problems came with
first loads of the master list page.
So, I can get international characters into the database now
(which is a step in the right direction for me), using an insert
form on the website, but I still can't get the international
characters to display on the returned page on first loading eg on a
list of jobs. Note that the detail pages display fine when clicking
the master links, and when I return from the detail page back to
the master list - the characters are ok. They just don't seem to
display when the master page loads for the first time which is
really perplexing me.
I suspect that I need to add the mysql_set_charset line below
the $connection and before the selects, inserts etc at all
instances on the webpage, but this just removes the recordset from
the menu, so this doesn't seem to be a good option.
Can anyone point me in the right direction as I'm been stuck
on this for ages. It may be something simple like adding $ in front
of the mysql_query, but then again maybe not.
I've tried other forums - but people seem to be content with
viewing but not offering assistance. I don't believe that what I'm
doing here hasn't been done before....all I want is for my pages to
display international characters and for these to display correctly
in phpmyadmin so that when I insert, update and delete records
using webforms I don't have to resort to using &#xxx inserts.
Help please!.oO(08Green)
> So...a bit of searching, and I read that in order for
the international
>characters to display in phpmyadmin correctly, I needed
to amend my php page
>code so that for all instances where I see the connection
to the database,
>before the SELECT, INSERT and DELETE queries, I need to
add either
>mysql_set_charset('utf8', $connection) or use three lines
of code referencing
>mysql_query SET NAMES, SET CHARACTER SET and SET
COLLATION_CONNECTION for utf8.
Usually you only need to send a SET NAMES 'utf8' right after
the
connection to the DB has been established. That way all data
that is
transferred between the DB and your script will be handled as
UTF-8.
> I did that, and it removed all of my recordsets in the
sidebar menu! Not too
>good. I'm left with a task of rebuilding pages now.
>
> So I placed the mysql_set_charset line in the
connection.php file in the DW
>Connections folder below the connection there instead. [I
didn't precede the
>mysql etc line with a $ sign - I wonder if that's the
issue?]
I've never used mysql_set_charset().
Here in my applications it always works like this:
* the default charset in my InnoDB tables is ISO-8859-1, I
only use
UTF-8 in the columns that really need it (text data, but not
INT or
DATE columns)
* SET NAMES 'utf8' at the beginning
* all files (HTML and PHP) are encoded as UTF-8 without BOM
* all pages delivered as UTF-8 (my pages are
script-generated, so I use
an appropriate header() call to define the content-type and
encoding)
That's it. Oh, and I don't use phpMyAdmin ...
> With this change I could use the Insert forms to add the
international
>characters directly into the database and see through
phpmyadmin that all was
>hunky dory. But then the problems came with first loads
of the master list
>page.
In the first part of your posting it sounded as if it worked
almost
correctly, before you tried to fix the broken phpMyAdmin
appearance.
Is that correct?
> So, I can get international characters into the database
now (which is a step
>in the right direction for me), using an insert form on
the website, but I
>still can't get the international characters to display
on the returned page on
>first loading eg on a list of jobs.
They did display correctly first, didn't they? So it seems
that you
broke your script just in order to fix some PMA problem.
Revert that.
Make your script work for normal input/output from/to a
website first
and don't worry about PMA for now.
What do you need PMA for BTW? It may have many other issues
as well and
should only be used if really necessary or if you're not
familiar with
the command line interface. The only thing that we are using
it is to
get a dump from a remote DB, where I don't have shell access
to call
mysqldump directly (yes, I could also write a little PHP
script for
that, it's already somewhere on my TODO). But here on my
local system I
always use the MySQL command prompt if I have to directly
work on some
tables or to import the dump from remote.
Anyway, if you need PMA, your might try their group or forum.
I'm sure
there's an FAQ as well. Maybe it's just a configuration
issue.
> I've tried other forums - but people seem to be content
with viewing but not
>offering assistance. I don't believe that what I'm doing
here hasn't been done
>before....all I want is for my pages to display
international characters and
>for these to display correctly in phpmyadmin so that when
I insert, update and
>delete records using webforms I don't have to resort to
using &#xxx inserts.
The bug here is PMA itself. ;-)
Micha -
Use PHP code coloring in HTML files
In Dreamweaver CS3, what changes do I need to make to get PHP
code coloring show up in .html files?robot88888888,
First, copy this file from the app config folder:
C:\Program Files\Adobe\Adobe Dreamweaver
CS3\configuration\CodeColoring\PHP.xml
To the user config folder:
C:\Documents and Settings\[username]\Application
Data\Adobe\Dreamweaver
9\Configuration\CodeColoring\
Then open PHP.xml in your favorite editor. You need to add
HTML to all
of the doctype lists Change every occurrence of this:
doctypes="PHP_MySQL"
to be:
doctypes="PHP_MySQL,HTML"
Save and close. If DW is running, close it. Now restart DW.
HTH,
Randy
> In Dreamweaver CS3, what changes do I need to make to
get PHP code coloring show up in .html files? -
Adobe Muse html code and Constant Contact
Muse noobie question re: Adobe Muse html code and Constant Contact
We use Constant Contact for our email marketing. We prefer to generate our own html code and insert into Constant Contact. It has worked great for us in the past and bypasses and somewhat cumbserome Constant Contact interface.
We tried inserting html code from Muse and the results were surprising:
Any rectangles created were simply gone. Not showing. No colors, no outlines just gone.
Text formating was way off in size and fonts. Spacing issues too.
Page not centered. It looks centered in various browsers
Any suggestions please?It's not going to work.
The HTML/CSS/JavaScript abilities and requirements for browsers are vastly different that those of e-mail clients. The output of Adobe Muse relies on external CSS files and JavaScript, both of which are not available in most e-mail clients. -
How do i add html code to my muse site? I want pintrest to verify my site.
how do i add html code to my muse site? I want pintrest to verify my site.
Hi,
There are multiple ways in which you can add the HTML code to your site. Few methods are :-
1) Copy your HTML code, In Muse -> Select Objects-> Insert HTML . Paste your HTML code on the page. Please reer to this screenshot :- http://prntscr.com/52vprn
2) If you want to add the HTML code in the Head section of your page, Go to Page Properties-> Metadata-> HTML for <Head> . Please refer to this screenshot :- http://prntscr.com/52vpx5
Hope this helps
Regards,
Rohit Nair -
Problem in copy and paste html code generated from google adsense
tell me where can i paste the html code in mozila .
I am having account in googlemadsense and whenever i try to copy and go to paste in html it dosent work.please reply me.Hi Thanks for reply,but my dear freind as I written in my previous mail also that I am having account in google adsense and as per the given instructions only,when i try to paste the html code,which was generated from their adsense adposting , i try to paste that code after opening the html sources box,that code was not accepted.The html source window was slightly blocked.
And for your information i am not try to paste any other code from any otherwebsite like word press etc
Waiting for your reply soon.
Kavitha -
I embedded some HTML code into adobe Muse but not displaying when the pages are Exporting to HTML
I embedded some HTML code into adobe Muse and when I published the remote site on business catalyst the (Add This widget) HTML code shows up but when I exported the site to HTML pages and view the index page in the browser (Safari, Chrome, Firefox) the (Add this widget) HTML code wouldn't display on any of the pages. I've used this code before on other Muse sites not sure what could have happened. Thnx!!!
Hi,
Please take a look at this post for a similar discussion : Re: When i export my muse website my youtube video links stop working. Why is this?
Regards,
Aish -
I've created a toolset that allows me to add Form fields that
we use in our system. But now I want to take that a step further. I
want to be able to write corresponding PHP code above the HTML tag
at a specific location. This while looping through the formfields
in the form and dynamically write the INSERT and/or UPDATE query.
The last bit I can probably figure out. What I would like to
know is how to write the code above the HTML tag between <?
?> or with a search/replace of the INSERT or UPDATE line in the
code.
Can anyone give me some hints or tips on this?
Thanks in advance!Hi Bahare,
The <script> tag is used to define a client-side script, such as a JavaScript.
The <script> element either contains scripting statements or it points to an external script file through the src attribute.Common
uses for JavaScript are image manipulation, form validation, and dynamic changes of content.
You should write C# code inside asp.net (C#)(.cs).page. For more infomation,Please check
http://msdn.microsoft.com/en-us/library/vstudio/k33801s3(v=vs.100).aspx
In addition,
This forum is to discuss problems of C# development.
You'll need to post it in
ASP.NET forum for more efficient responses, where you can contact ASP.NET experts.
Best Regards,
Kristin -
How do i send an html file exported from muse as email blast with images and live links?
My question it:
How do i send an html file exported from muse as email blast with images and live links?
I have designed a "website" in adobe muse and exported it as an html file. I am not sure how to send my .html file in an email!
Best,
NicoleUnfortunately, the answer is, you don't. The requirements for HTML displayed in an e-mail reader are very different than those for HTML displayed in a browser. The output of Muse won't work as an HTML e-mail. You could upload the Muse site as a website and provide a link to it in an e-mail, but the HTML generated by Muse is not suitable for direct display by an e-mail program.
-
Hi, I pasted a line of code in my muse site, Is there any way to look at the code on my home page so i can remove this code? It is visible on my page when i view my site in browser, but i can't see it in muse.
How did you paste the code? Did you insert HTML elerment? Or just paste it on the page? What's the site address?
By the way. The code you have tried to add for Google webmaster tools should of been saved as a separate HTML file and upload it to your server to be verified, not put on the page, I think there are other methods that you put in the code to get verified.
thanks
jason -
Am I able to add custom PHP code to a site created with Adobe Muse?
I am looking into creating a new desktop and mobile website for a client and their current site is hosted on their own server and has custom PHP code. Would I be able to re-embed the code into the new site, or would you recommend just creating a new form in Muse and then transfer the site to their server?
Hi,
take a look o this thread, Can I use a php script in muse?
if you still have any question, please let us know -
Can i enter php code into html snippets?
I am an sql/php newbie ... and have my site hosted by a company which offers me sql and php hosting (unlike dotmac I understand) ...
I have created an sql database on their server and have written a page in html/php to display the results of a simple search ... can I insert this into iweb page using snippet - as I have tried and get a page cannot be displayed message where the snippet box would be on the webpage. (you can see this by clicking on the guestbook link on www.antandcleopuss.com)
I am wondering if iweb can insert php or if it is only html?
If iweb doesn't like php inserts then I will have to export my pages to a folder, then open them in a text editor to insert the php there?? (seems like an awfully long way round)
Any help gratefully received
antYou can add PHP code AFTER publishing the webpage.
Then change the extension to .php.
Here's a page the explains how to do it. It's not PHP specific but the routine is the same.
http://web.mac.com/wyodor/Ajax/
Of course you can add a PHP page to the HTML Snippet with an iframe. -
Are there PHP capabilities in Adobe Muse?
I apologize ahead of time for my lack of coding knowledge. I have basic HTML knowledge, but little more than that.
I'm attempting to start an online business and have been using Adobe Muse to create my website. So far, I've created a few pages and am linking through PayPal to work as my shopping cart (cart hosted on their website, with embeddable PayPal buttons on mine). While looking for cart software, it seems many of them exist in a more or less embeddable form as PHP code (I've also seen ASP but that is beyond me completely). Is my assumption correct in that the cart software itself is code that I can add to my website? If so, can Adobe Muse work with PHP? Or would I be better off learning and working through Dreamweaver? I've no experience with Dreamweaver. I also hate to branch off here, but if I'm to tackle Dreamweaver, would it be better if I became more well-versed in coding in general?
Thanks for your time.Moved from Cloud forum to Muse forum
Maybe you are looking for
-
Mac get hangs or frozen on start Up always
Hi, The problem occurs after, when I have updated my mac mini to 10.8.4, when mac start it always hangs up and its mouse dosen't work, what i need to do then is to press power button to take machine in sleep mode, then again I need to press power but
-
After spending a day at work listening to a wide array of podcasts and songs on my new iPod Touch, rating some so I can delete tunes I don't care for, I come home to find that the play count is 0 and that I haven't rated a thing. What's going on? Thi
-
Contact field in outlook access
how to write code for adding contacts field in a GUI(graphical user interface) like outlook web access. Can anyone guide me...Thanks in advance
-
Troubleshooting Audio Recording Premiere CS6
I'm having a problem recording audio in Premiere CS6, it appears that the input isn't getting to Premiere at all. It works fine in Audition and I have recorded there and imported to Premiere, but...I have checked the preferences and the correct mike
-
Problem in Hardisek external & flash memory
hi gays >> how are you evreone .. ??? >> A week ago I had worked for the Desktop were formate and the computer works well .. After formic and I have a problem in Hardisek external flash memory does not work .. Note that the entrance other USB works w