2 scripts samen voegen
wie kan mij helpen om 2 scripts samen tevoegen de een is een html bestand waar een php bestand in verwerkt moet worden.
groetjes,
mads
Allereerst maar even de vraag, wat houden beide bestanden in en hoe groot zijn deze?
Hoe maakt de grootte uit?
ik bedoel met groote, de omvang , het aantal regels etc... Op basis daarvan de hoeveelheid werk bepalen.
De vraag is misschine: moet iemand helpen en de scripts voor je samen voegen of wil je dat iemand uitlegt hoe je html en php moet combineren ?
het is meer van kopieren plakken maar ik weet niet waar de php moet begingen en wat van de php er in moet kommen te staan
Meestal staat de php boven en de html onder aan je pagina, maar zonder een relevante code weten wij dit nooit precies.
Wat voor scripts zijn het?
ik zal de scripts hier plaatsen
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?
if (!$_GET['wsn'] || !$_GET['mail'] || !$_GET['vzk'] || !$_GET['user'] || !$_GET['pass']){
//Install form...
echo "<form method=GET action=install.php>";
echo "WebShopnaam:<br>";
echo "<input type=text name=wsn><br>";
echo "E-mailadres voor de bestellingen:<br>";
echo "<input type=text name=mail><br>";
echo "Verzend kosten binnen Nederland:<br>";
echo "<input type=text name=vzk><font size=1>(euro.centen)</font><br>";
echo "Gebruikersnaam:<br>";
echo "<input type=text name=user><br>";
echo "Wachtwoord:<br>";
echo "<input type=password name=pass><br>";
echo "<input type=submit value='Installeer'></form>";
}
else{
//Installeren
$orig = umask();
umask(0);
mkdir("WSFILES", 0777);
umask($orig);
$file = fopen("WSFILES/cats", "a");
fclose ($file);
$file = fopen("WSFILES/producten", "a");
fclose ($file);
unlink("config.php");
$file = fopen("config.php", "a");
$string = "<?," . $_GET['wsn'] . "," . $_GET['mail'] . "," . $_GET['vzk'] . "," . md5($_GET['user']) . "," . md5($_GET['pass']) . ",?>";
fputs($file, $string);
fclose($file);
echo "WebShop v.3 is nu met succes geÔnstalleerd, verwijder install.php om misbruik te voorkomen!";
echo "<br><br><a href=index.php>Klik hier om naar de webshop te gaan</a><br><br>";
echo "<a href=admin.php>Klik hier om naar de admin te gaan</a>";
}
?>
if (!$_GET['wsn'] || !$_GET['mail'] || !$_GET['vzk'] || !$_GET['user'] || !$_GET['pass']){
//Install form...
echo "<form method=GET action=install.php>";
echo "WebShopnaam:<br>";
echo "<input type=text name=wsn><br>";
echo "E-mailadres voor de bestellingen:<br>";
echo "<input type=text name=mail><br>";
echo "Verzend kosten binnen Nederland:<br>";
echo "<input type=text name=vzk><font size=1>(euro.centen)</font><br>";
echo "Gebruikersnaam:<br>";
echo "<input type=text name=user><br>";
echo "Wachtwoord:<br>";
echo "<input type=password name=pass><br>";
echo "<input type=submit value='Installeer'></form>";
}
else{
//Installeren
$orig = umask();
umask(0);
mkdir("WSFILES", 0777);
umask($orig);
$file = fopen("WSFILES/cats", "a");
fclose ($file);
$file = fopen("WSFILES/producten", "a");
fclose ($file);
unlink("config.php");
$file = fopen("config.php", "a");
$string = "<?," . $_GET['wsn'] . "," . $_GET['mail'] . "," . $_GET['vzk'] . "," . md5($_GET['user']) . "," . md5($_GET['pass']) . ",?>";
fputs($file, $string);
fclose($file);
echo "WebShop v.3 is nu met succes geÔnstalleerd, verwijder install.php om misbruik te voorkomen!";
echo "<br><br><a href=index.php>Klik hier om naar de webshop te gaan</a><br><br>";
echo "<a href=admin.php>Klik hier om naar de admin te gaan</a>";
}
?>
zal ik in deze html code willen hebben de html code blijft steeds hetzelfde alleen php verandert telkens.
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Generator" content="iWeb 3.0.1" />
<meta name="iWeb-Build" content="local-build-20100125" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta name="viewport" content="width=700" />
<title>webshop</title>
<link rel="stylesheet" type="text/css" media="screen,print" href="webshop_files/webshop.css" />
<!--[if lt IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='webshop_files/webshopIE.css'/><![endif]-->
<!--[if gte IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='Media/IE8.css'/><![endif]-->
<style type="text/css">
/*<![CDATA[*/
@import "Scripts/Widgets/HTMLRegion/Paste.css";
/*]]>*/
</style>
<script type="text/javascript" src="Scripts/iWebSite.js"></script>
<script type="text/javascript" src="Scripts/Widgets/SharedResources/WidgetCommon.js"></script>
<script type="text/javascript" src="Scripts/Widgets/Navbar/navbar.js"></script>
<script type="text/javascript" src="Scripts/iWebImage.js"></script>
<script type="text/javascript" src="Scripts/iWebMediaGrid.js"></script>
<script type="text/javascript" src="Scripts/Widgets/HTMLRegion/Paste.js"></script>
<script type="text/javascript" src="webshop_files/webshop.js"></script>
</head>
<body style="background: rgb(255, 255, 255) url(webshop_files/PhotoGray_browser_bg-2.jpg) repeat scroll top left; margin: 0pt; " onload="onPageLoad();" onunload="onPageUnload();">
<div style="text-align: center; ">
<div style="margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; overflow: hidden; position: relative; word-wrap: break-word; text-align: left; width: 700px; " id="body_content">
<div style="background: transparent url(webshop_files/PhotoGray_bg_c-1.jpg) repeat scroll top left; width: 700px; ">
<div style="margin-left: 0px; position: relative; width: 700px; z-index: 0; " id="nav_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"></div>
<div style="height: 700px; width: 700px; height: 700px; left: 0px; position: absolute; top: -80px; width: 700px; z-index: 1; " class="tinyText style_SkipStroke">
<img src="webshop_files/Darkroom_spotlight.jpg" alt="" style="border: none; height: 700px; width: 700px; " />
</div>
<div style="height: 1px; line-height: 1px; " class="tinyText"></div>
<div class="com-apple-iweb-widget-navbar flowDefining" id="widget0" style="margin-left: 0px; margin-top: 157px; opacity: 1.00; position: relative; width: 700px; z-index: 1; ">
<div id="widget0-navbar" class="navbar">
<div id="widget0-bg" class="navbar-bg">
<ul id="widget0-navbar-list" class="navbar-list">
<li></li>
</ul>
</div>
</div>
</div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
new NavBar('widget0', 'Scripts/Widgets/Navbar', 'Scripts/Widgets/SharedResources', '.', {"path-to-root": "", "navbar-css": ".navbar {\n\tfont-family: Futura, 'Trebuchet MS', sans-serif;\n\ttext-transform: uppercase;\n\tfont-size: .7em;\n\tcolor: #C1C1C1;\n\tline-height: 25px;\n\ttext-align: center;\n\tpadding: 0px;\n\tbackground-image: url(webshop_files\/PhotoGray_nav_bg.png);\n\t_background-image: url(webshop_files\/PhotoGray_nav_bg.jpg);\n\tbackground-repeat: repeat-y;\n\tborder-top: 1px solid #999;\n\tborder-bottom: 1px solid #999;\n}\n\n.navbar-bg {\n\tpadding: 6px 0px 4px 0px;\n}\n\n.navbar ul {\n\tlist-style: none;\n\tmargin: 0px;\n\tpadding: 0px 10px 0px 10px;\n}\n\n.navbar ul li {\n\tdisplay: inline; \n\tlist-style-type: none;\n\tmargin: 0px;\n\tpadding: 0px 10px 0px 10px;\n}\n\n\n.noncurrent-page a:visited {\n\ttext-decoration: none;\n\tcolor: #C1C1C1;\n\ttext-shadow: 0px -1px 2px #333;\n}\n\n.noncurrent-page a {\n\ttext-decoration: none;\n\tcolor: #C1C1C1;\n\ttext-shadow: 0px -1px 2px #333;\n}\n\n\n.noncurrent-page a:hover {\n\ttext-decoration: none;\n\tcolor: #EC001E;\n\ttext-shadow: 0px -1px 2px #333;\n}\n\n.current-page a\n{\n\ttext-decoration: none;\n\tcolor: #000;\n\ttext-shadow: 0px -1px 2px #7E7E7E;\n}\n\n.current-page a:visited\n{\n\ttext-decoration: none;\n\tcolor: #000;\n\ttext-shadow: 0px -1px 2px #7E7E7E;\n}\n\n", "current-page-GUID": "2A13A682-72DC-4DFE-9B42-6E77AE261C32", "isCollectionPage": "NO"});
//--><!]]></script>
<img src="Media/Duplicate-State-900x200-rgb.gif" alt="" style="height: 165px; left: -4px; position: absolute; top: -3px; width: 707px; z-index: 1; " />
<div style="clear: both; height: 0px; line-height: 0px; " class="spacer"></div>
</div>
<div style="float: left; height: 0px; line-height: 0px; margin-left: 0px; position: relative; width: 700px; z-index: 10; " id="header_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"></div>
</div>
<div style="margin-left: 0px; position: relative; width: 700px; z-index: 5; " id="body_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"></div>
<div class="com-apple-iweb-widget-HTMLRegion" id="widget1" style="height: 564px; left: 186px; opacity: 1.00; position: absolute; top: 123px; width: 328px; z-index: 1; ">
<script type="text/javascript"><!--//--><![CDATA[//><!--
var widget1_htmlMarkupURL = ".//webshop_files/widget1_markup.html";
//--><!]]></script>
<div id="widget1-htmlRegion" class="html_region_widget"></div>
</div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
new Paste('widget1', 'Scripts/Widgets/HTMLRegion', 'Scripts/Widgets/SharedResources', '.', {"emptyLook": false});
//--><!]]></script>
<div id="id1" style="height: 50px; left: 125px; position: absolute; top: 38px; width: 452px; z-index: 1; " class="style_SkipStroke_1 shape-with-text stroke_0">
<div class="text-content graphic_textbox_layout_style_default_External_448_46" style="padding: 2px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-top: 0pt; " class="Free_Form"><a title="Prijslijsten.html" href="Prijslijsten.html"> klik hier</a> voor een prijslijst of producten die we u kunnen leveren.<br /></p>
<p style="padding-bottom: 0pt; " class="Free_Form">Wilt u weten hoe het te werk gaat, <a title="uitleg.html" href="uitleg.html">klik hier</a> voor uitleg.</p>
</div>
</div>
</div>
<div style="height: 687px; line-height: 687px; " class="spacer"></div>
</div>
<div style="height: 150px; margin-left: 0px; position: relative; width: 700px; z-index: 15; " id="footer_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"></div>
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Generator" content="iWeb 3.0.1" />
<meta name="iWeb-Build" content="local-build-20100125" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta name="viewport" content="width=700" />
<title>webshop</title>
<link rel="stylesheet" type="text/css" media="screen,print" href="webshop_files/webshop.css" />
<!--[if lt IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='webshop_files/webshopIE.css'/><![endif]-->
<!--[if gte IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='Media/IE8.css'/><![endif]-->
<style type="text/css">
/*<![CDATA[*/
@import "Scripts/Widgets/HTMLRegion/Paste.css";
/*]]>*/
</style>
<script type="text/javascript" src="Scripts/iWebSite.js"></script>
<script type="text/javascript" src="Scripts/Widgets/SharedResources/WidgetCommon.js"></script>
<script type="text/javascript" src="Scripts/Widgets/Navbar/navbar.js"></script>
<script type="text/javascript" src="Scripts/iWebImage.js"></script>
<script type="text/javascript" src="Scripts/iWebMediaGrid.js"></script>
<script type="text/javascript" src="Scripts/Widgets/HTMLRegion/Paste.js"></script>
<script type="text/javascript" src="webshop_files/webshop.js"></script>
</head>
<body style="background: rgb(255, 255, 255) url(webshop_files/PhotoGray_browser_bg-2.jpg) repeat scroll top left; margin: 0pt; " onload="onPageLoad();" onunload="onPageUnload();">
<div style="text-align: center; ">
<div style="margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; overflow: hidden; position: relative; word-wrap: break-word; text-align: left; width: 700px; " id="body_content">
<div style="background: transparent url(webshop_files/PhotoGray_bg_c-1.jpg) repeat scroll top left; width: 700px; ">
<div style="margin-left: 0px; position: relative; width: 700px; z-index: 0; " id="nav_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"></div>
<div style="height: 700px; width: 700px; height: 700px; left: 0px; position: absolute; top: -80px; width: 700px; z-index: 1; " class="tinyText style_SkipStroke">
<img src="webshop_files/Darkroom_spotlight.jpg" alt="" style="border: none; height: 700px; width: 700px; " />
</div>
<div style="height: 1px; line-height: 1px; " class="tinyText"></div>
<div class="com-apple-iweb-widget-navbar flowDefining" id="widget0" style="margin-left: 0px; margin-top: 157px; opacity: 1.00; position: relative; width: 700px; z-index: 1; ">
<div id="widget0-navbar" class="navbar">
<div id="widget0-bg" class="navbar-bg">
<ul id="widget0-navbar-list" class="navbar-list">
<li></li>
</ul>
</div>
</div>
</div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
new NavBar('widget0', 'Scripts/Widgets/Navbar', 'Scripts/Widgets/SharedResources', '.', {"path-to-root": "", "navbar-css": ".navbar {\n\tfont-family: Futura, 'Trebuchet MS', sans-serif;\n\ttext-transform: uppercase;\n\tfont-size: .7em;\n\tcolor: #C1C1C1;\n\tline-height: 25px;\n\ttext-align: center;\n\tpadding: 0px;\n\tbackground-image: url(webshop_files\/PhotoGray_nav_bg.png);\n\t_background-image: url(webshop_files\/PhotoGray_nav_bg.jpg);\n\tbackground-repeat: repeat-y;\n\tborder-top: 1px solid #999;\n\tborder-bottom: 1px solid #999;\n}\n\n.navbar-bg {\n\tpadding: 6px 0px 4px 0px;\n}\n\n.navbar ul {\n\tlist-style: none;\n\tmargin: 0px;\n\tpadding: 0px 10px 0px 10px;\n}\n\n.navbar ul li {\n\tdisplay: inline; \n\tlist-style-type: none;\n\tmargin: 0px;\n\tpadding: 0px 10px 0px 10px;\n}\n\n\n.noncurrent-page a:visited {\n\ttext-decoration: none;\n\tcolor: #C1C1C1;\n\ttext-shadow: 0px -1px 2px #333;\n}\n\n.noncurrent-page a {\n\ttext-decoration: none;\n\tcolor: #C1C1C1;\n\ttext-shadow: 0px -1px 2px #333;\n}\n\n\n.noncurrent-page a:hover {\n\ttext-decoration: none;\n\tcolor: #EC001E;\n\ttext-shadow: 0px -1px 2px #333;\n}\n\n.current-page a\n{\n\ttext-decoration: none;\n\tcolor: #000;\n\ttext-shadow: 0px -1px 2px #7E7E7E;\n}\n\n.current-page a:visited\n{\n\ttext-decoration: none;\n\tcolor: #000;\n\ttext-shadow: 0px -1px 2px #7E7E7E;\n}\n\n", "current-page-GUID": "2A13A682-72DC-4DFE-9B42-6E77AE261C32", "isCollectionPage": "NO"});
//--><!]]></script>
<img src="Media/Duplicate-State-900x200-rgb.gif" alt="" style="height: 165px; left: -4px; position: absolute; top: -3px; width: 707px; z-index: 1; " />
<div style="clear: both; height: 0px; line-height: 0px; " class="spacer"></div>
</div>
<div style="float: left; height: 0px; line-height: 0px; margin-left: 0px; position: relative; width: 700px; z-index: 10; " id="header_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"></div>
</div>
<div style="margin-left: 0px; position: relative; width: 700px; z-index: 5; " id="body_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"></div>
<div class="com-apple-iweb-widget-HTMLRegion" id="widget1" style="height: 564px; left: 186px; opacity: 1.00; position: absolute; top: 123px; width: 328px; z-index: 1; ">
<script type="text/javascript"><!--//--><![CDATA[//><!--
var widget1_htmlMarkupURL = ".//webshop_files/widget1_markup.html";
//--><!]]></script>
<div id="widget1-htmlRegion" class="html_region_widget"></div>
</div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
new Paste('widget1', 'Scripts/Widgets/HTMLRegion', 'Scripts/Widgets/SharedResources', '.', {"emptyLook": false});
//--><!]]></script>
<div id="id1" style="height: 50px; left: 125px; position: absolute; top: 38px; width: 452px; z-index: 1; " class="style_SkipStroke_1 shape-with-text stroke_0">
<div class="text-content graphic_textbox_layout_style_default_External_448_46" style="padding: 2px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-top: 0pt; " class="Free_Form"><a title="Prijslijsten.html" href="Prijslijsten.html"> klik hier</a> voor een prijslijst of producten die we u kunnen leveren.<br /></p>
<p style="padding-bottom: 0pt; " class="Free_Form">Wilt u weten hoe het te werk gaat, <a title="uitleg.html" href="uitleg.html">klik hier</a> voor uitleg.</p>
</div>
</div>
</div>
<div style="height: 687px; line-height: 687px; " class="spacer"></div>
</div>
<div style="height: 150px; margin-left: 0px; position: relative; width: 700px; z-index: 15; " id="footer_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"></div>
</div>
</div>
</div>
</div>
</body>
</html>
als iemand mij goed kan uitleggen waar het moet wil ik het zelf ook wel doen
Gewijzigd op 01/01/1970 01:00:00 door P Lekensteyn
Normaal doe je zoveel mogelijk php code boven de html, Op zijn minst de bewerkingen.
oke bedankt
Warning: fopen() [function.fopen]: Unable to access config.php in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/webshop-1/index.php on line 3
wat moet ik hier tegen doen
Deze error heeft niets met je css te maken. Hij kan config.php niet vinden.
hoe kan ik dat oplossen
Mark schreef op 25.01.2010 19:40:
Normaal doe je zoveel mogelijk php code boven de html, Op zijn minst de bewerkingen.
Bij voorkeur de gehele html van php scheiden. Net als de css volledig van de html scheiden. Dus ik vraag me af waarom iemand het in z'n hoofd haalt om het te willen samenvoegen....
nouja je config.php bestand in de zelfde map plaatsen op je hosting