問題が発生しました。私はcpanelのpublic_htmlフォルダに通常のhtmlファイル(contact.html)を持っています。 CodeIgniterで開発された管理パネル。今私がしようとしているのは、contact.htmlファイルからcodeigniterコントローラーへの入力データを印刷または受け取ることです。以下のコードcodeigniterフォルダの外部にcodeigniterフォルダへの入力データを投稿
contact.html
<html>
<form name ="userinput" action="admin/index.php/contact/contact" method="post">
<div class="row contact-form">
<div class="col-lg-6">
<input type="text" name="yourname" id="yourname" class="form-control" placeholder="Your Name">
</div><!-- end col -->
</div><!-- end row -->
</form>
コントローラ言及:contact.php
今<?php
class Contact extends CI_Controller
{
function contact()
{
echo 'test';
echo $yourname = $this->input->post('yourname');
}
}?>
私はデータ 'テスト' を提出しています印刷しているのが、私は得ることができませんテキストボックスの投稿データ。 エラーは以下のとおりです。
A PHPエラーが
重大度発生しました:未定義のプロパティを::
メッセージに注目してください問い合わせ:: $入力
ファイル名:コントローラー/ contact.php
行番号:12
私はそれをどうやって得るのか教えてください。
役立ちます – Poria
はい私はすでに機能を作成しました..しかし、知りませんそれが表示されていません。@Poria –