연락처 양식이 있습니다. 내 서버에서 호스팅 할 때 제대로 작동하지만 클라이언트 서버에 업로드 할 때 문제가 발생했습니다. 가정 ''PHP_SELF ''E에 - 정의되지 않은 상수 'PHP_SELF'의 사용 : : \ 도메인 \의 C I 얻을 형태PHP 폼 - 정의되지 않은 상수 'PHP_SELF'
공지 사항의 상단에 다음과 같은 오류 http://www.conceptonegfx.com/contact.php
: 여기 페이지를 확인하시기 바랍니다 \ conceptonegfx.com \ user \ htdocs \ fns.php 42 행
공지 사항 : 정의되지 않은 색인 : 'PHP_SELF'in E : \ Domains \ c \ conceptonegfx.com \ user \ htdocs \ fns.php 42 행 " id = "uploadform"enctype = "multipart/form-data">
다음은 fns.php의 문제 행입니다.
<?php
//start session
if(!isset($_SESSION))
{
session_start();
}
// prints form
function print_form(){
?>
<form method="post" class="action="<?php echo $_SERVER[’PHP_SELF’];?>" id="uploadform" enctype="multipart/form-data">
<p><label for="namefrom">Name <span class="required">*</span></label>
<input name="namefrom" id="namefrom" type="text" class="field" value="<?= $_SESSION['myForm']['namefrom']; ?>" tabindex="1"/></p>
<p><label for="emailfrom">Email <span class="required">*</span></label>
<input name="emailfrom" id="emailfrom" type="text" class="field" value="<?= $_SESSION['myForm']['emailfrom']; ?>" tabindex="3"/></p>
<p><label for="phone">Phone</label>
<input name="phone" id="phone" type="text" class="field" value="<?= $_SESSION['myForm']['phone']; ?>" tabindex="4"/></p>
<p><label for="message">Message <span class="required">*</span></label>
<textarea name="comments" id="comments" rows="10" cols="35" align="left" class="field" tabindex="6"><?= $_SESSION['myForm']['comments']; ?></textarea></p>
<p><label for="attachment">File Upload<br /></label>
<input name="attachment" id="attachment" type="file" tabindex="7">
<p><input align="left" type="submit" name="submit" id="submit" value="Send Email" tabindex="8"/></p>
<p><input type="hidden" name="submitted" value="true" /></p>
</form>
@rdlowrey 거기에 물건을 추가하고 신용을 줬습니다. – Iznogood
신용은 필요없고 정확합니다. Downvote가 취소되었습니다, upvote 주어진. 모두가 물건을 놓친다. 중요한 점은 누군가가 빠뜨린 것을 발견하거나 잘못했을 때 답을 수정하는 것입니다. – rdlowrey