脚本宝典收集整理的这篇文章主要介绍了php – 使用CodeIgniter http:// :: 1 / codeigniter / in html sourcecode在表单操作中显示IP地址,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我试过了
echo form_oPEn('verifylogin'); echo form_open();
<form action="http://::1/codeignITer/verifyLOGin"> <form action="http://::1/codeigniter/">
分别.
我不明白这个“http:// :: 1 /”是什么,如何摆脱它?
> http:// :: 1 / yourPRoject /
> http://127.0.0.1/yourproject/
有机会将基本网址留空
/* |-------------------------------------------------------------------------- | Base Site URL |-------------------------------------------------------------------------- | | URL to your CodeIgniter root. Typically this will be your base URL,| WITH a trailing slash: | | http://example.COM/ | | WARNING: You MUST set this value! | | If it is not set,then CodeIgniter will try guess the protocol and path | your installation,but due to security concerns the hostname will be set | to $_SERVER['SERVER_ADDR'] if available,or localhost otherwise. | The auto-detection mechanism exists only for convenience during | development and MUST NOT be used in production! | | If you need to allow multiple domains,remember that this file is still | a PHP script and you can easily do that on your own. | */ $config['base_url'] = '';
现在,在最新版本的codeIgniter中,不建议您将base_url留空.
> $config [‘base_url’] =’http:// localhost / yourproject /’;
> $config [‘base_url’] =’http://www.example.com/’;
并且总是好的结束url与/
您可能需要在此处为您的表单创建路线
application > config > routes.PHP
CodeIgniter 3:Routing
CodeIgniter 2:Routing
更新:
有时候会发生这样的情况,所有这些都可能在本地主机环境中工作较少,但是当您访问实时服务器时,会发生错误或不提交表单正确等.
示例:从Controllers这也适用于Models
这是有效的
<?PHP class Verifylogin extends CI_Controller { public function __construct() { parent::__construct(); } public function index() { } }
这是有效的
<?PHP class Verify_login extends CI_Controller { public function __construct() { parent::__construct(); } public function index() { } }
这是无效的
class verifylogin extends CI_Controller { public function __construct() { parent::__construct(); } public function index() { } }
这是无效的
class Verify_Login extends CI_Controller { public function __construct() { parent::__construct(); } public function index() { } }
Codeigniter Doc’s
以上是脚本宝典为你收集整理的php – 使用CodeIgniter http:// :: 1 / codeigniter / in html sourcecode在表单操作中显示IP地址全部内容,希望文章能够帮你解决php – 使用CodeIgniter http:// :: 1 / codeigniter / in html sourcecode在表单操作中显示IP地址所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。