How to read a file This post will explain how to read and write files using php. When reading a file from php, we can let the user select the file or we can give a specific file manually. Here is a explanation for reading and writing a csv file. if (!empty($_POST) && $_POST['file_upload']) { $target_file = '/tmp/' . basename($_FILES["file_name"]["name"]); $fileType = pathinfo($target_file,PATHINFO_EXTENSION); if($fileType =='csv'){ // read the csv file. Discussed below }else{ $this->session->set_flashdata('error_message', "Please upload valid file type"); } Here we have check if the is a post(that means submit button has been pressed). Then we have uploaded the file to a folder called tmp. Then we check the file format(whether it is csv or not). Then we set some config $config['upload_path'] = '/tmp'; $config['allowed_types'] = '*'; $config[
First go to relevant folder from the terminal. cd 'project path' To clone existing git project, git clone 'project git clone link given by git' When you finish setting up new project, you need to download 3 rd party directories to your project. To do that first go to relevant project folder in terminal and type following command. php composer.phar update After setting up the new project, you need to setup the database also. To do that you have to execute the sql as well. You can do your changes in a separate branch and merge it into main branch To create a new branch git checkout -b "developer_develop" You can do your developing and push it to your branch. git status It will display all files in the project that you have edited. You can set the file paths that you want to push. You can put more than one file at a time. To do that use a keyboard space between two files. git add application/modules/property/models/propert