GoDaddy의 CPanel 호스팅을 사용하고 있는데 제출 웹 사이트를 로컬로 개발하는 것을 끝 냈지만 서버에 업로드 할 때 index.php 파일의 본문은 표시되지 않습니다 .서버가 HTML 또는 PHP 본문을 표시하지 않습니다
verything은 로컬 호스트에서 Wamp로 로컬로 잘 작동하기 때문에 index.php 파일과 관련이 없다고 생각하지만 CPanel 서버는 작동을 거부합니다. http://submit.arhsj.com/은 index.php가있는 곳입니다. 페이지의 제목이 변경된 것을 볼 수 있으며 요소를 검사하여 머리가 물건을 포함하고 있지만 몸이 비어 있음을 볼 수 있습니다.
다음은 submit.arhsj.com 폴더에있는 파일입니다. 당신이 필요한 생각하면
나는 더 많은 정보를 제공 할 수 있습니다. 나는 localhost에서 완벽하게 작동 할 때 왜 작동하지 않는지에 대해 정말로 혼란스러워합니다. 2 개의 PHP 섹션 중간에있는 HTML 양식조차도 표시되지 않습니다.
의 index.php 코드 :
<!DOCTYPE html>
<html>
<head>
<title>Submission Website</title>
<script src='https://www.google.com/recaptcha/api.js'></script>
</head>
<body>
<?php
require('/recaptcha/src/autoload.php');
require_once "recaptchalib.php";
$siteKey = 'XXXXXXXXXXXXXX';
$secret = 'XXXXXXXXXXXXX';
$lang = 'en';
$response = null; // empty response
$reCaptcha = new ReCaptcha($secret); // check secret key
if (isset($_POST['g-recaptcha-response'])) { // if submitted check response
$response = $reCaptcha->verifyResponse(
$_SERVER['REMOTE_ADDR'],
$_POST['g-recaptcha-response']
);
}
if ($response != null && $response->success) {
echo "Thanks for your submission!";
} else {
?>
<form action="upload.php" method="post" enctype="multipart/form-data">
Select image to submit*:
<input type="file" accept=".gif,.png,.jpg,.jpeg" name="submission" id="submission" required>
<br>Allowed file types: .png .jpg .jpeg .gif
<br><input type="text" name="first_name" id="first_name" placeholder="First Name*" maxlength="56" required>
<br><input type="text" name="last_name" id="last_name" placeholder="Last Name*" maxlength="56" required>
<br><input type="text" name="email" id="email" placeholder="Email Address*" maxlength="128" required>
<br><input type="checkbox" id="rights" value="rights" required>I created this meme or found this meme online but have not changed anything (such as removing watermarks).
<br><input type="checkbox" id="age" value="rights" required>I am 13 years of age or older.
<br><br>By clicking "Submit", you have read, accepted, and agreed to adhere to our Terms of Submission.
<div class="g-recaptcha" data-sitekey="XXXXXXXXXXXXXX"></div>
<input type="submit" value="Submit" name="submit">
<br><br>* Required
</form>
<?php
}
?>
</body>
</html>
PHP 코드를 삭제하려고 했습니까? –
코드가 [this] (https://gyazo.com/8189d48c148e709fe50939fb24540148)로 바뀌고 로그를 확인 했습니까? – Script47
@ Script47이 대체되지 않았습니다. PHP 코드를 시작할 때 코드가 막혔습니다. –