有人可以帮助我为这些页面形成提交处理程序吗?我需要它来创建一个新的php或html文件,该文件的日期和标题以html或php链接作为博客文章。 示例:12162018BlogPost.html <-防止在创建时删除以前的文件。
需要编辑的每个部分均标有“ <!-编辑->”
已提供链接以方便访问。
Submission Form:以下HTML
@Configuration
public class WebConfig implements WebMvcConfigurer {
private final ConversionService mConversionService;
@Autowired
public WebConfig(@Lazy ConversionService conversionService) {
mConversionService = conversionService;
}
}
Template Post:带有$ header和$ message标记的HTML编辑标题,标题,照片和消息
<!--Editing-->
<form id="submission" method="post" action="submission-handler.php" enctype="multipart/form-data">
Blog Title:<center><textarea name="header" type="text" class="form-control" placeholder="Blog Post Header" rows="2" required></textarea></center>
<br>
Blog Content:<center><textarea name="message" class="form-control" placeholder="Type your blog post here" rows="10" required></textarea></center>
<br>
Upload an image: (Not Currently Working)
<center><input type="file" name="filetoupload" id="filetoupload">
<select>
<option selected="selected" value="noimage">No Image</option>
<option value="wrapleft">Image on Left</option>
<option value="wrapright">Image on Right</option>
<option value="nowrap">Image Centered</option>
</select></center>
<br>
<br>
<hr>
<br>
<br>
<input type="submit" class="form-control submit" value="Preview Post" disabled>
<input type="submit" class="form-control submit" value="Finalize Post" disabled>
</form>
<!--/Editing-->
任何其他需要的细节都可以随时询问。我愿意回答任何问题。
当前提交处理程序我不知道我在做什么
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" content="width=device-width, initial-scale=1.0">
<!--Blog Post Name as Title-->
<!--Editing-->
<title><?php echo = '$header'; ?> | Insert Name | TimeScape Inc</title>
<!--/Editing-->
<link rel="stylesheet" type="text/css" href="Resources/CSS/main.css">
<link href="Resources/CSS/Extra.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-100075704-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-100075704-1');
</script>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-8019229992747723",
enable_page_level_ads: true
});
</script>
<!-- Hotjar Tracking Code for www.timescapeinc.com -->
<script>
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:990575,hjsv:6};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
</script>
</head>
<body>
<!--Background-->
<div id="back"></div>
<div id="front"></div>
<div id="front2"></div>
<!--Navigation bar-->
<div id="nav-placeholder">
</div>
<script>
$(function(){
$("#nav-placeholder").load("../../../nav.html");
});
</script>
<!--end of Navigation bar-->
<!--Body-->
<div id="wrapper">
<ul class="social"><li><div id="propicture"><div class="profile"><img src="Resources/IMG/7d1a3f77eee9f34782c6f88e97a6c888.jpg"></div></div></li><li><div class="information">
<!--Edit Information below-->
<p><h2><Insert Name></h2></p>
<p><nav><ul class="social">
<!--Social Media 1-->
<li><a href="https://facebook.com/editthis"><img height="50" src="Resources/IMG/cfacebook.png" alt="facebook"></a></li>
<!--Social Media 2-->
<li><a href="https://plus.google.com/editthis"><img height="50" src="Resources/IMG/cG+.png" alt="google+"></a></li>
<!--Social Media 3-->
<li><a href="https://youtube.com/editthis"><img height="50" src="Resources/IMG/cYT.png" alt="youtube"></a></li>
<!--Social Media 4-->
<li><a href="https://twitter.com/editthis"><img height="50" src="Resources/IMG/ctwitter.png" alt="twitter"></a></li></ul>
</nav></p></div>
</li></ul>
<!--About Section-->
<div class="container">
<!--Editing-->
<!--Generate Lorem Ipsum by typing lorem(number) then press tab-->
<center><h1><?php echo = '$header'; ?></h1></center>
<!--idk how to change below to image location and location value
Example of location value: "nowrap", "wrapleft", "wrapright", "noimage"
image location is "Resources/IMG/<Uploaded image>" -->
<?php <img class="nowrap" src="Resources/IMG/755118806-cloudscape-moving-clouds-horizon-over-land-rural-scene.jpg">; ?>
<p><?php echo = '$message'; ?></p>
<!--/Editing-->
</div>
<!--Blog Content-->
<div class="selection">
<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
/*
var disqus_config = function () {
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://timescapeinc.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><br/><br/></div></div>
<!--Footer-->
<div class="outer" align="center">
<div class="footer">
<p>TimeScape Inc</p>
<script type="text/javascript" src="https://www.freevisitorcounters.com/en/home/counter/376592/t/5"></script>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-8019229992747723",
enable_page_level_ads: true
});
</script>
</div>
</div>
<!--Share Buttons-->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5b67cad9677767c0"></script>
<script id="dsq-count-scr" src="//timescapeinc.disqus.com/count.js" async></script>
</body>
</html>
提前谢谢!