הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   איך ניתן לעשות INCLUDE עם JS? (https://hosts.co.il/forums/showthread.php?t=47885)

X-T 20-06-07 11:03

עדיין דף ריק
בדף שאני מציג:
PHP קוד:

<script language="javascript" src="http://www.xxx.co.il/xxx/marquee.php?id=1"></script> 

וב marquee.php
PHP קוד:

<script language="javascript">document.write('<marquee height="<?=$height;?>" width="<?=$width;?>" direction="<?=$move;?>"><?=$text;?></marquee>');</script>

כל הזמן דף ריק \=

Source 20-06-07 11:10

תוריד את התגיות <script> (בדף marquee.php).

X-T 20-06-07 11:12

עדיין....

Source 20-06-07 11:21

הורדת גם את </script>?

ותנסה לפתוח את marquee.php (בדפדפן, לא בעורך) ותגיד מה רואים...

X-T 20-06-07 11:26

ציטוט:

נכתב במקור על ידי Source (פרסם 502850)
הורדת גם את </script>?

ותנסה לפתוח את marquee.php (בדפדפן, לא בעורך) ותגיד מה רואים...

כן הורדתי ...
הפלט של הקובץ
document.write('
בלהה בלהה
');

ה-בלהה בלהה זה הטקסט שרץ
ובמקום שאני מעונין להדפיס לא מוצג כלםום =\

somebody 20-06-07 11:46

סתכל שהגרש( ') לא חוזרת לך שוב במחרוזת.

X-T 20-06-07 11:48

הוא לא חוזר, בדקתי.
אבל זה הקובץ המלא:
PHP קוד:

<html dir="rtl">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
</head>
<style>
body,marquee{
font-family:arial;
font-size:14px;
};
</style>
<?
include "db.php";
$id $_GET['id'];
$query mysql_query("SELECT * FROM settings WHERE id='$id'");
$rr mysql_fetch_array($query);
$move $rr['move'];
$speed $rr['speed'];
$height $rr['height'];
$width $rr['width'];
$text $rr['text'];
if(
$move == 1){
    
$move "right";
}
if(
$move == 2){
    
$move "left";
}
if(
$move == 3){
    
$move "down";
}
if(
$move == 4){
    
$move "up";
}
?>
document.write('<marquee height="<?=$height;?>" width="<?=$width;?>" direction="<?=$move;?>"><?=$text;?></marquee>');
</body>

</html>


mlnn 20-06-07 12:14

תוריד את כל זה:
<html dir="rtl">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
</head>
<style>
body,marquee{
font-family:arial;
font-size:14px;
};
</style>

+

</body>

</html>

X-T 20-06-07 12:56

Thanks

Tomer 20-06-07 15:28

Source קיבלת אזהרה.

האשכול ננעל.


כל הזמנים הם GMT +2. הזמן כעת הוא 13:49.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ