PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > PHP within shtml?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
PHP within shtml?

Réponse
 
LinkBack Outils de la discussion
Vieux 28/04/2008, 16h35   #1
jmpatrick63@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut PHP within shtml?

Not sure if this is even possible...

I have a website with a PHP-based message board. The message board
has a donation tracker plug in that manages donation goals and current
donation amounts. At the top of my message board there is a
dynamically updated donation total. It uses this code to display the
information:

Amount We Need To "Keep It Free": $ {$this->ipsclass-
>cache['donate_cache']['total_goals']}<br>

<br>
Amount Donated To Date: $ {$this->ipsclass->cache['donate_cache']
['total_donations']}

I'd like to also add this dynamically generated tally to my main
site's SHTML page. Is there a way to add PHP, using Javascript or
whatever, so that the tally grabs what it needs from the database?

Thanks!
  Réponse avec citation
Vieux 28/04/2008, 16h42   #2
Captain Paralytic
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PHP within shtml?

On 28 Apr, 15:35, jmpatric...@gmail.com wrote:
> Not sure if this is even possible...
>
> I have a website with a PHP-based message board. The message board
> has a donation tracker plug in that manages donation goals and current
> donation amounts. At the top of my message board there is a
> dynamically updated donation total. It uses this code to display the
> information:
>
> Amount We Need To &quot;Keep It Free&quot;: $ {$this->ipsclass->cache['donate_cache']['total_goals']}<br>
>
> <br>
> Amount Donated To Date: $ {$this->ipsclass->cache['donate_cache']
> ['total_donations']}
>
> I'd like to also add this dynamically generated tally to my main
> site's SHTML page. Is there a way to add PHP, using Javascript or
> whatever, so that the tally grabs what it needs from the database?
>
> Thanks!


XHR?
  Réponse avec citation
Vieux 29/04/2008, 00h21   #3
NC
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PHP within shtml?

On Apr 28, 8:35 am, jmpatric...@gmail.com wrote:
>
> I have a website with a PHP-based message board. The message board
> has a donation tracker plug in that manages donation goals and current
> donation amounts. At the top of my message board there is a
> dynamically updated donation total. It uses this code to display the
> information:
>
> Amount We Need To &quot;Keep It Free&quot;: $ {$this->ipsclass->cache['donate_cache']['total_goals']}<br>
>
> <br>
> Amount Donated To Date: $ {$this->ipsclass->cache['donate_cache']
> ['total_donations']}
>
> I'd like to also add this dynamically generated tally to my main
> site's SHTML page. Is there a way to add PHP, using Javascript or
> whatever, so that the tally grabs what it needs from the database?


Doing it the way you want (i.e., combining SSI and PHP
in a single file) is impossible (SSI and PHP are handled by
different server modules, so you can't combine SSI and PHP
code and expect the server to execute both).

What you can do is create a simple PHP script that only shows
"Amount Needed" and "Amount Donated" and show its output in an
iframe on the main (or any other) page.

A slight modification of this approach is to create an AJAX-type
widget that would request the PHP script and display its output
in a predefined location on the home page.

Cheers,
NC
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h04.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11549 seconds with 11 queries