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

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   [PHP] הפנייה תקנית. (https://hosts.co.il/forums/showthread.php?t=43884)

adi92 19-04-07 08:38

[HTML] הפנייה תקנית.
 
הקוד כפי שאני שם אותו ככה:
HTML קוד:

<META HTTP-EQUIV="Refresh" CONTENT="5; URL=index.php?act=main">
מראה לי שגיאות בולידטור.

מה הבעיה ?

Tomer 19-04-07 10:14

תנסה לרשום את הכל באותיות קטנות..

PHP קוד:

<meta http-equiv="refresh" content="5; url=index.php?act=main"


eliav12 19-04-07 10:49

אני ממליץ לך לבצע הפניית 301.

adi92 19-04-07 12:07

ניסיתי לרשום באותיות קטנות, זה לא שינה(השגיאה עדיין אותה שגיאה).
ואני לא יכול לשים 301 כי זה באמצע הקוד.

~עריכה~

בעצם אחרי ששמתי את הכל באותיות קטנות נשארה רק שגיאה אחת:

Line 33 column 63: document type does not allow element "meta" here.
...p-equiv="refresh" content="5; url=index.php?act=main"/> The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

~עריכה~

וכשתיקנתי אותה ככה:
PHP קוד:

<html><head><meta http-equiv="refresh" content="5; url=index.php?act=main" /><title></title> </head><body></body></html

השגיאה שאני מקבל היא שHTML לא מורשה במקום הזה..

Chip3D 19-04-07 12:49

אולי במקום לעשות את כל הקוד בשורה אחת, תנסה לפרוס אותו על כמה שורות? (אני לא בטוח בזה, אבל שווה לנסות)

adi92 19-04-07 12:56

לא זאת הבעיה.

Alter 19-04-07 13:07

אפשר לינק לדף פה או בפרטי?

Tomer 19-04-07 13:29

שים את ה meta הזה ב head שלך.

LosNir 19-04-07 16:06

תשתמש בהפניית JS.
מכיוון שהוא עושה את ההפניה באמצע הדף הוא לא יכול לשים את זה ב HEAD.

opsite 19-04-07 16:08

PHP קוד:

<script language="JavaScript">
window.location=("index.php");
</script> 

עודכן


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

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