Importent Notes
1.URI Segment
Using CodeIgniter URL class’s function, we can retrieve information from URI string. In this tutorial we are going to explain how we can use the URI class in CodeIgniter to retrieve information from URI segment.
uri segment url se data get krane k lie use hota hai indexing URL ke function ke indexing ke according specific data get karne ke lie use hota hai ..
2.  =in use space
3.flash data. kuch time k lie data store karta hai session mai
4.database se same data se jo register hai usse login k lie hum count krenge for example if(count($valid)>0) isme condition hai if k sath hai ki agr count $vaild mai jo data hai vo 0 se bada hai.
5.explode function= sting ko aaray mai convert ke lie use hota hai
6.implode function =array ko string mai convert karta hai
6.is_numeric function = Finds whether a variable is a number or a numeric string(ye varuable mai dekta hai ki value number ya numaric hai ya nahi
if(is_numeric($order_id)){
$this->session->set_flashdata('flash_message', 'updated');
redirect('admin/pin/add');
}else{
$this->session->set_flashdata('flash_message', 'not_updated');
}
iska meaning hai ki agar $order id ka under store data number mai hai to ek temprry session create hoga or data ko insert ya jo query lagi hai usme condition true hoke message updated show hoga or use page mai redarict krega agr condition
faluse hoti hai to else wali conditon chlegi
7.'pinid' => random_string('alnum',6).random_string('alnum',4),
alnum =is syntax mai alnum alfa numaric hai jo randomly alfa numeric data get krwata hai or jo number hai wo string ya syntex ki lenght hai
8.array_marge = 2 array ka data 1 aaray mai marge karte hai 1 array mai 2table ka data store ho jata hai.(the data of 2array is stored in 1 array.)
9.array_colum Array_column () फ़ंक्शन इनपुट सरणी में sirf 1कॉलम से मान लौटाता है। for emap.ye sirf ek colum ka data hi get kraega (Array_column () that returns a value from a single column in the input array.)
10.model=>query= mai limit ka use kissi condition ko limit di jati hai ki jo data hai isse jyada ni ho skta isme limit 10 tk ki di hai
model $this->db->limit(10);
12.website close krne ke li hum main admin or view dono mai index file pe die();use krte hai
Zero It Soluation
1.var dump or print mai diffrence ye hai ki print r mai only data array mai deta hai bt var dump mai data object or string or array sbhi k sath deta hai
2.Role agr database k user table mai Admin or User ka role dia hai to hum Query mai is functon ko use krenge jo highlight kia hai red mai===>
public function add(){
require_once
expression is identical to require except PHP will check if the file has already been included, and if so, not include (require) it again.session_unset
- Frees all session variables (It is equal to using:$_SESSION = array();
for older deprecated code)unset($_SESSION['Products']);
- Unset only Products index in session variable. (Remember: You have to use like a function, not as you used)session_destroy
— Destroys all data registered to a session
- 1)inprocess session.
- 2)out Process session.
- 3)SQl-server session.
- 10.include() function is not able to find a specified file on location at that time it will throw a warning message however, it will not stop script execution.
include_once() If the code from a file has been already included then it will not be added again if we use include_once().
require_once() the code from a php file has been already included then it will not be included again if we use require_once(). It implies require_once() will add the file just once at a time. If it can’t locate a specified file, at that time it will generate a fatal error but it will stop the content execution.
required()The Require() function is also used to put data of one PHP file to another PHP file. If there are any errors then the require() function produces a warning and a fatal error and stops the execution of the script i.e. the script will continue to execute.
Comments
Post a Comment