część kodu content.php
<script type="text/javascript"> /*Example message arrays for the two demo scrollers*/ var pausecontent=new Array() <?php include "display_gorace_oferty.php"; ?> /*pausecontent[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a><br />Comprehensive JavaScript tutorials and over 400+ free scripts!' pausecontent[1]='<a href="http://www.codingforums.com">Coding Forums</a><br />Web coding and development forums.' pausecontent[2]='<a href="http://www.cssdrive.com" target="_new">CSS Drive</a><br />Categorized CSS gallery and examples.' */ </script>
kod display_gorace_oferty.php
<?php ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Główna</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <?php include "admin/globals.php"; $i=0; $i++; } ?> </body></html>
Link: http://poligrafia1.nazwa.pl/helmut/orbis2
Link 2: http://poligrafia1.nazwa.pl/helmut/orbis
Dlaczego w pierwotnej wersji (link 2) skrypt działa, a w drugiej (link) nie działa?
Przypuszczam, że jest to wina złego includowania pliku php w znaczniku <script type="text/javascript">...</script>
Ale dlaczego w takim razie w pierwotnej wersji działa?