锘??xml version="1.0" encoding="utf-8" standalone="yes"?>69视频在线观看,男女视频在线观看免费,欧美男男激情freegayhttp://www.aygfsteel.com/hwpok/category/53899.htmlDEBUG - 澶╅亾閰嫟zh-cnThu, 26 Sep 2013 03:26:40 GMTThu, 26 Sep 2013 03:26:40 GMT60PHP 鍙傛暟鐨勪紶閫?/title><link>http://www.aygfsteel.com/hwpok/archive/2013/09/25/404439.html</link><dc:creator>鎯犱竾楣?/dc:creator><author>鎯犱竾楣?/author><pubDate>Wed, 25 Sep 2013 13:12:00 GMT</pubDate><guid>http://www.aygfsteel.com/hwpok/archive/2013/09/25/404439.html</guid><wfw:comment>http://www.aygfsteel.com/hwpok/comments/404439.html</wfw:comment><comments>http://www.aygfsteel.com/hwpok/archive/2013/09/25/404439.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/hwpok/comments/commentRss/404439.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/hwpok/services/trackbacks/404439.html</trackback:ping><description><![CDATA[1. 鍚戞帶鍒跺櫒浼犲弬鏁?br />   鍦ㄦ帶鍒跺櫒鐨勬柟娉曞悕閲屽畾涔夊弬鏁? 閫?a/a渚濇浼犻掑弬鏁?br /><br />2.鎺у埗鍣ㄥ悜view浼犻掑弬鏁?br />  $data = Array("name"=>$name,"count"=>$count);<div><span style="white-space: pre;">  </span>$this->load->view ( "test_view",$data);</div><br /><br /><br /><br /><img src ="http://www.aygfsteel.com/hwpok/aggbug/404439.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/hwpok/" target="_blank">鎯犱竾楣?/a> 2013-09-25 21:12 <a href="http://www.aygfsteel.com/hwpok/archive/2013/09/25/404439.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>php 瀛︿範(fàn)2http://www.aygfsteel.com/hwpok/archive/2013/09/25/404438.html鎯犱竾楣?/dc:creator>鎯犱竾楣?/author>Wed, 25 Sep 2013 13:02:00 GMThttp://www.aygfsteel.com/hwpok/archive/2013/09/25/404438.htmlhttp://www.aygfsteel.com/hwpok/comments/404438.htmlhttp://www.aygfsteel.com/hwpok/archive/2013/09/25/404438.html#Feedback0http://www.aygfsteel.com/hwpok/comments/commentRss/404438.htmlhttp://www.aygfsteel.com/hwpok/services/trackbacks/404438.html1.user_login.php
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<title>Insert title here</title>
</head>
<body>
 <center>
    <h1><?php $this->load->view('index.html');?></h1>
    <h1>鐢ㄦ埛鐧婚檰</h1>
    <form action="/php/myweb/index.php/login/logina" method="post">
        鐢ㄦ埛鍚? <input type="text" name="username"/><br />
        瀵?nbsp; 鐮? <input type="password" name="password"/><br />
        <input type="submit" value="鎻愪氦"><br />
    </form>
 </center>
</body>
</html>
2.LoginController
<?php
class Login extends CI_Controller 
{
    function index() 
    {
        $this->load->view ( "aa/user_login" );
    }
    
    function logina() 
    {

        $this->load->model('user_model');
        $user = $this->user_model->user_find_by_username ( $_POST ['username'] );
        if ($user
        {
            
            if ($user [0]->password == $_POST ['password'])
            {
                $arr = Array ('id' => $user [0]->id );
                
                $this->load->library ( 'session' );
                $this->session->set_userdata ( $arr );
                
                echo 'aa<br />';
                echo $this->session->userdata ( 'id' );
            } 
            else 
            {
                echo '瀵嗙爜涓嶆紜?;
            }
        } 
        else 
        {
            echo "鐢ㄦ埛鍚嶄笉瀛樺湪";
        }
        // var_dump($reult);
        // echo $reult[0]->username;

         
    }
    
    function check_login() 
    {
        $this->load->library ( 'session' );
        if ($this->session->userdata ( 'id' )) 
        {
            echo '宸茬粡鐧婚檰';
        } 
        else 
        {
            echo '娌℃湁鐧婚檰';
        }
    }
    function login_out() 
    {
        $this->load->library ( 'session' );
        $this->session->unset_userdata ( 'id' );
    }
}

3.userControl
<?php
class User extends CI_Controller
{
    function insert()
    {
        $this->load->model('user_model');
        $arr = Array('username'=>'hwpok', 'password'=>'123456');
        $this->user_model->user_insert($arr);
    }
    
    function update()
    {
        $this->load->model('user_model');
        $id = 2;
        $arr = Array('username'=>'hwpokay', 'password'=>'123456');
        $this->user_model->user_update($id$arr);
    }
    
    function del()
    {
        $this->load->model('user_model');
        $id = 4;
        $this->user_model->user_del($id);
    }
    
    function find()
    {
        $this->load->model('user_model');
        $id = 2;
        $reult = $this->user_model->user_find($id);
        //var_dump($reult);
        echo $reult[0]->username;
    }
    
    
}

4. userModel
<?php
class User_model extends CI_Model {
    
    function __construct() 
    {
        parent::__construct ();
        $this->load->database ();
    }
    
    function user_insert($arr
    {
        $this->db->insert ( 'php_t_user', $arr );
    }
    
    function user_update($id$arr)
    {
        $this->db->where('id',$id);
        $this->db->update('php_t_user',$arr);
    }
    
    function user_del($id)
    {
        $this->db->where('id',$id);
        $this->db->delete('php_t_user');
    }
    
    function user_find($id)
    {
        $this->db->where('id',$id);
        $this->db->select('*');
        $res = $this->db->get('php_t_user');
        return $res->result();
    }
    
    function user_find_by_username($username)
    {
        $this->db->where('username',$username);
        $this->db->select('*');
        $res = $this->db->get('php_t_user');
        return $res->result();
    }
}


]]>
php 瀛︿範(fàn)1http://www.aygfsteel.com/hwpok/archive/2013/09/25/404422.html鎯犱竾楣?/dc:creator>鎯犱竾楣?/author>Wed, 25 Sep 2013 08:23:00 GMThttp://www.aygfsteel.com/hwpok/archive/2013/09/25/404422.htmlhttp://www.aygfsteel.com/hwpok/comments/404422.htmlhttp://www.aygfsteel.com/hwpok/archive/2013/09/25/404422.html#Feedback0http://www.aygfsteel.com/hwpok/comments/commentRss/404422.htmlhttp://www.aygfsteel.com/hwpok/services/trackbacks/404422.html
 1 <?php
 2 if (! defined ( 'BASEPATH' ))
 3     exit ( 'No direct script access allowed' );
 4 class Hello extends CI_Controller {
 5     public function sayHello() {
 6         $name = "huiwanpeng";
 7         @$count =file_get_contents('./num.txt');
 8         
 9         $count = $count ? $count : 0;
10         $count = $count + 1;
11         
12         $re = fopen('./num.txt', 'w'); 
13         fwrite($re$count);
14         fclose($re);
15         
16         $data = Array("name"=>$name,"count"=>$count);
17         $this->load->view ( "test_view",$data);
18         //echo "helloa";
19     }
20 } 

view

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
 <?php echo  $name ?>
 <?php echo  $count ?>
</body>
</html>






]]>
鍦╳indows 銆乴inux涓?鍘繪帀CI榛樿url涓殑index.php澶勭悊鏂規(guī)硶http://www.aygfsteel.com/hwpok/archive/2013/09/25/404413.html鎯犱竾楣?/dc:creator>鎯犱竾楣?/author>Wed, 25 Sep 2013 04:43:00 GMThttp://www.aygfsteel.com/hwpok/archive/2013/09/25/404413.htmlhttp://www.aygfsteel.com/hwpok/comments/404413.htmlhttp://www.aygfsteel.com/hwpok/archive/2013/09/25/404413.html#Feedback0http://www.aygfsteel.com/hwpok/comments/commentRss/404413.htmlhttp://www.aygfsteel.com/hwpok/services/trackbacks/404413.html涓虹編瑙備竴浜涳紝鍘繪帀CI榛樿url涓殑index.php澶勭悊鏂規(guī):涓涓槸鍦╨inux閲岄潰   涓涓槸鍦?strong style="color: white; background-color: #880000;">windows

閲岄潰閰嶇疆鐜
涓銆嬪湪linux閲岄潰璁劇疆
1.鎵撳紑apache鐨勯厤緗枃浠訛紝conf/httpd.conf 錛?/p>

LoadModule rewrite_module modules/mod_rewrite.so錛屾妸璇ヨ鍓嶇殑#鍘繪帀銆?br />鎼滅儲(chǔ) AllowOverride None錛堥厤緗枃浠朵腑鏈夊澶勶級(jí)錛岀湅娉ㄩ噴淇℃伅錛屽皢鐩稿叧.htaccess鐨勮琛屼俊鎭敼涓篈llowOverride All銆傘愬叾瀹瀉pache 榛樿鐨勯兘宸茬粡鎵撳紑鐨勩?/p>

2.鍦?strong style="color: black; background-color: #ffff66;">CI鐨勬牴鐩綍涓嬶紝鍗沖湪index.php錛宻ystem鐨勫悓綰х洰褰曚笅錛屽緩绔?htaccess錛岀洿鎺ュ緩绔嬭鏂囦歡鍚嶄笉浼?xì)鎴愬姛锛屽彲浠ュ厛寰忕珛璁颁簨鏈枃錃g錛屽彟瀛樹(shù)負(fù)璇ュ悕鐨勬枃浠跺嵆鍙傚唴瀹瑰涓嬶紙CI鎵嬪唽涓婁篃鏈変粙緇嶏級(jí)錛?br />RewriteEngine on  
RewriteCond $1 !^(index\.php|images|robots\.txt)  
RewriteRule ^(.*)$ /index.php/$1 [L]
濡傛灉鏂囦歡涓嶆槸鍦╳ww鐨勬牴鐩綍涓嬶紝渚嬪鏄細(xì)http://localhost/nianyi_2011/index.php,絎笁琛?/p>

闇瑕佹敼鍐欎負(fù)RewriteRule ^(.*)$ /nianyi_2011/index.php/$1 [L]
鍙﹀錛屽鏋滀綘鐨勭綉绔欑殑鏍圭洰褰曚笅闈㈣繕鏈夊叾浠栫殑鏂囦歡澶癸紝渚嬶細(xì)js錛宑ss錛宨mages錛宑onfig絳夌瓑鏂囦歡澶癸紝榪欓渶瑕佽繃婊ら櫎鍘伙紝絎簩琛岄渶瑕佹敼鍐欎負(fù)錛?br />RewriteCond $1 !^index\.php|images|js|css|config|robots\.txt)銆?br />3.灝?strong style="color: black; background-color: #ffff66;">CI涓厤緗枃浠訛紙application/config/config.php錛変腑$config['index_page'] ="index.php";鏀瑰啓鎴?config['index_page'] = "";
4.ok錛屽畬鎴愩傝繕瑕佽寰楅噸鍚痑pache銆?/p>

浜屻嬪湪windows閲岄潰寮鍙?/p>

浠ヤ笂鐨勯厤緗湪windows涓婇潰鏄笉璧蜂換浣曚綔鐢ㄧ殑錛屾墍浠ユ垜浠湪windows閲岄潰闇瑕佽緗垜浠殑apache鐨勮櫄鎷熶富鏈猴紝鍦╝pache閲岄潰鎵懼埌Apache-20\conf\extra\httpd-vhosts.conf 榪欎釜鏂囦歡銆愭垜鐢ㄧ殑鏄湇鍔℃槸PHPnow錛屽緢澶氱殑浜虹敤wamp銆戯紝鍚屾牱鎵懼埌姝ゆ枃浠訛紝鍦ㄩ噷闈慨鏀癸紝渚嬶細(xì)
#http://www.PHPnow.org
# filename: httpd-vhosts.conf
<Directory ../vhosts>
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
NameVirtualHost *
<VirtualHost *>
    DocumentRoot ../htdocs
    ServerName default:80
    ErrorLog logs/default-error_log
</VirtualHost>
淇敼鎴愶細(xì)
#http://www.PHPnow.org
# filename: httpd-vhosts.conf
<Directory ../vhosts>
    RewriteEngine on  
    RewriteCond $1 !^(index\.php|images|js|css|config|robots\.txt)  
    RewriteRule ^(.*)$ /index.php/$1 [L]
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
NameVirtualHost *
<VirtualHost *>
    DocumentRoot ../htdocs
    ServerName default:80
    ErrorLog logs/default-error_log
</VirtualHost>
涔熷氨鏄妸璺敱鍐欏埌榪欓噷闈㈡潵銆傝寰楅噸鏂板惎鍔ㄦ湇鍔°?/p>

緇х畫(huà)淇敼浣犵殑閰嶇疆鏂囦歡錛?br />$config['enable_query_strings'] = true
$config['controller_trigger'] = 'c';
$config['function_trigger']  = 'm';
鎶?config['enable_query_strings']  淇敼鎴?false 榪欐牱灝卞叧闂簡(jiǎn)鏌ヨ瀛楃涓插艦寮?URL

鐜板湪浣犵殑鏂囦歡鐨勮礬寰勫氨鍙互鍐欏緱浜?jiǎn)锛屼緥濡傚Q?a href="http://localhost/nianyi_2011/user/user_point" style="color: #3fa7cb;">http://localhost/nianyi_2011/user/user_point

灝辯浉褰撲簬鍏堝墠娌℃湁閰嶇疆鐨勮礬鐢憋細(xì)http://localhost/nianyi_2011/index.php?c=user&m=user_point鍚屾牱濡傛灉鍚庨潰鏈夊弬鏁扮殑璇濓紝鍙敤寰鍚庝竴嬈$瘡鍔犲氨濂界殑浜?jiǎn)銆?/p>

璇鋒敞鎰忥細(xì)鏈夋椂鍊欐垜浠繖鏍峰啓涔嬪悗鏍峰紡鏂囦歡鍔犺澆榪涙潵浼?xì)鏈夐棶棰樺Q屾壘涓嶅埌js  css  images絳夌瓑鐩綍錛屾垜浠彲浠ラ厤緗枃浠禼onfig.php閲岄潰璁劇疆$config['base_url'] = 'http://localhost/2011_11_cms/';绔欑偣鐨勭洰褰曪紝鎺ョ潃鎴戜滑鍦╲iew妯℃澘鏂囦歡<head></head>涔嬮棿娣誨姞<base href="<?=base_url()?>" />錛岃繖鏍峰氨鑳藉姞杞藉叾浠栫殑鏂囦歡鐨勪簡(jiǎn)



]]>
php debughttp://www.aygfsteel.com/hwpok/archive/2013/09/23/404316.html鎯犱竾楣?/dc:creator>鎯犱竾楣?/author>Mon, 23 Sep 2013 03:21:00 GMThttp://www.aygfsteel.com/hwpok/archive/2013/09/23/404316.htmlhttp://www.aygfsteel.com/hwpok/comments/404316.htmlhttp://www.aygfsteel.com/hwpok/archive/2013/09/23/404316.html#Feedback0http://www.aygfsteel.com/hwpok/comments/commentRss/404316.htmlhttp://www.aygfsteel.com/hwpok/services/trackbacks/404316.htmlzend_extension_ts="C:\AppServ\php5\php_xdebug-2.1.0-5.2-vc6.dll"
xdebug.remote_enable=On
xdebug.remote_host="localhost:8080"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"

]]>
主站蜘蛛池模板: 孝昌县| 民县| 武城县| 准格尔旗| 宁安市| 江安县| 夏邑县| 化州市| 永靖县| 石林| 麦盖提县| 枣强县| 株洲县| 陇西县| 崇义县| 荆门市| 广东省| 孟津县| 旌德县| 丰镇市| 宜良县| 丹巴县| 鄄城县| 延川县| 龙门县| 锡林郭勒盟| 葫芦岛市| 峨眉山市| 延津县| 吴江市| 新竹县| 上蔡县| 赤水市| 博野县| 福安市| 西充县| 会理县| 应城市| 临高县| 湘潭县| 禹州市|