Jump to content
php.lv forumi

Source koda atspoguļošana no MySQL DB ar PHP..


Cibiņš

Recommended Posts

Mēģinu visādīgi bet kautkā nesanāk..kāds varētu mani apgaismot, kā pareizi īsti vajag darīt lai piemēram metatagi un javasktripti tiktu arī atspoguļoti lapā.. (apskatot lapas sourci tas skripts ir tur kur viņu vajag, bet apskatot pašu lapu skripts netiek parādīts (!!!)) Izmantoju parasto variantu ar kuru atspoguļo tekstu lapā..pieņemsim ka to pašu tinymce konfigurācijas javaskriptu lai atspoguļotu lapā...

 

<?php
   $result = mysql_query("SELECT description, source FROM pg_javascript WHERE id = $id;");
   if (!$result) { include("resources/pages/notfound2.php"); }
   elseif (!mysql_num_rows($result)) { include("resources/pages/notfound2.php"); } 
else {
   extract(mysql_fetch_array($result), EXTR_PREFIX_ALL, 'scripting');
   ?>
   <div class="readText"><?php echo "$scripting_source"; ?></div>
<? } ?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...