Hi,
When I try to run a simple html page in web browser without php server, it works fine. But when I paste the same html file in www folder of WAMP server, and try to run the page, the div: <div id="menu" class="menu"></div>, is being added automatically.
I do not understand why WAMP is adding this div automatically ?
Why <div id="menu" class="menu"></div> ?
Moderator: General Moderators
-
phpcoder511
- Forum Newbie
- Posts: 4
- Joined: Sat May 17, 2014 7:41 am
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Why <div id="menu" class="menu"></div> ?
Can you post the code and filenames for both files. Are you using a app or framework?
(#10850)
-
phpcoder511
- Forum Newbie
- Posts: 4
- Joined: Sat May 17, 2014 7:41 am
Re: Why <div id="menu" class="menu"></div> ?
File name: index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>test</title>
</head>
<body>
<p>Hello</p>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>test</title>
</head>
<body>
<p>Hello</p>
</body>
</html>
-
phpcoder511
- Forum Newbie
- Posts: 4
- Joined: Sat May 17, 2014 7:41 am
Re: Why <div id="menu" class="menu"></div> ?
I am just using notepad to edit the html file.
when i do: localhost/index.html,
the <div id="menu" class="menu"></div>, is added automatically when I see the html code in browser.
when i do: localhost/index.html,
the <div id="menu" class="menu"></div>, is added automatically when I see the html code in browser.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Why <div id="menu" class="menu"></div> ?
Do you have Server Side Includes set in your web server. Or do you have PHP set with auto_prepend_file or auto_append_file ?
(#10850)
-
phpcoder511
- Forum Newbie
- Posts: 4
- Joined: Sat May 17, 2014 7:41 am
Re: Why <div id="menu" class="menu"></div> ?
No, prepend or append is not set in php.ini:
Automatically add files before PHP document.
; http://php.net/auto-prepend-file
auto_prepend_file =
; Automatically add files after PHP document.
; http://php.net/auto-append-file
auto_append_file =
Automatically add files before PHP document.
; http://php.net/auto-prepend-file
auto_prepend_file =
; Automatically add files after PHP document.
; http://php.net/auto-append-file
auto_append_file =
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US