Jump to content

Search the Community

Showing results for tags 'codeigniter'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

  1. Hi! I am using codeigniter framework, and what I am trying too do is to route the user to the right adress. I have the URL like this: www.site.se/en/webshop/method www.site.se/webshop/method and the problem is that the /en/ will not make any difference, because I am trying to bypass that with this: $route['([a-zA-Z]+)/(:any)'] = '$2'; So if there is anything with a-zA-Z then it will ignore it and just go with the rest of the url ($2). This doesn't work correctly. If I go to: www.site.se/en/webshop/ then it works, this too: www.site.se/webshop/ This also work: www.site.se/en/webshop/method BUT this doesn't work: www.site.se/webshop/method SO the problem is, if I don't have any language in the url, the method don't run. I hope you understand the problem and can help me, because I am stuck here, and I don't understand why this don't work, or what to try with... Thanks in Advance!
  2. I have setup the CI app at the port 9001. I didn't do the rewrite things. So my url looks like the original one mysite:9001/index.php/category/shoes. It works well before I setup the Squid. I tried to setup the Squid on the same server with Apache. I assigned the port 9000 to Squid. To test, I added a simple sysinfo.php file to display phpinfo on the root of my app. It works if I do mysite:9000/sysinfo.php (go through Squid). However if I do mysite:9000/index.php/category/shoes, it will say "404 page not found". The mysite:9001/index.php/category/shoes still works though. Can anyone give me a hand on this? Thanks!
  3. Hi, I am going to build a bus ticket booking application. I am very much familiar with Codeigniter and used in 8 projects. But FuelPHP and latest trend of Laravel are knocking my heart. I have learned FuelPHP and Laravel but not yet build any app. Ellis lab dis-counted the support and development for CI, hence it is half dead as community is still active. But now I want to try something new so which of the following is perfect for bus booking application ? FuelPHP or Laravel ? While reading their Docs, I think FuelPHP is easy compared to Laravel. But if Laravel is going to give more advantages, I will go for it.
  4. hello guys i need a suggestion regarding which php framework to use for an ERP Application. We at our company have planned to make a ERP for Hotel. We are planing to cover aspects like - Room Booking, Restaurant, Cafe & Bar, Front Desk, Back Office, Kitchen, Inventory, Payment & Accounts etc.. The application will be installed on local server and work on intranet. Oracle will be used as database. It is suggested by our analysis team that for payment, credit card swipe machine should be there. So the framework that we will choose should be compatible with 3rd party tools or APIs. Since database will be Oracle so framework should also be compatible with Oracle. I have searched the web for the best suited framework. There are the top 3 frameworks- CI, Zend, Yii. I have not worked on any of the above frameworks. Which framework should i use. Plz suggest guys.Thanks.
  5. which is the best framework to use so as to create a front end and a back end of a website or i just use php from scratch. Thanks
  6. when i try to run from localhost, the login page appears..but when i try to login using user number and password...it quits to wamp homepage...i attache several file of the coding..hope u guys can help me...anybody can help i will email the full coding.. thank you... config.php welcome.php auth.php modelauth.php
  7. I have question about I.P. configuration. On IIS server we have a default I.P. that we use to access the web pages,e.g. 123.45.6.7 . Can I change I.P. or going to create a virtual I.P. just to view specific page. Current I.P. : 123.45.6.7 Virtual I.P. : 134.25.7.6/page I am using codeigniter as my framework. Or maybe if it can be done on coding?
  8. Hi, I want to know, how to fetch specific fields in database table in codeigniter, for example i want to get user name, password & e-mail id in one database. Please provide me the php code if anyone have.
  9. I would have simply edited my previous topic had it not been locked, however I am asking the same TYPE of question - looking at it from a different angle (hope that's OK). I am trying to generate a "past events" page for my CI website, using a MySQL database table called "events". There are 100+ rows of data, some duplicate, that range across 5 major countries - England, Ireland, Norther Ireland, Scotland and Wales - many different major cities - again, including duplicate entries - and venues. I have struggled for a couple of weeks now with how to query and return the data in the following format: <h1>** grouped country **</h1> <h2> ** grouped city **</h2> <p>** grouped venue **</p>Such as: <h1>England</h1> <h2>London</h2> <p>Tower of London</p> <h2>Manchester</h2> <p>Canal Street</p> <p>Old Trafford</p> <h1>Ireland</h1> <h2>Dublin</h2> <p>St. James' Gate</p> <h1>Scotland</h1> <h2>Glasgow</h2> <p>Buchanan Street</p> <p>Tron Theatre</p>I am DELIBERATELY not including any of my code for model, view and controller, as what I have thus far seems to confuse people as to what I'm trying to achieve when they see it. And I'm open to the fact I may be attacking this from the wrong angle altogether... I just need to result the above! It feels as if this SHOULD be a fairly simple thing to achieve, but I NEED HELP!
  10. I have a robots.txt on the site root directory with the content text of: User-agent: * Disallow: / By reading some stuffs they say that no crawler will engage the file content of my site like google and it will be safe for the bad crawlers not see the directory of your site and of course it is good for the security. But when I search the site on google it happen that A description for this result is not available because of this site's robots.txt – learn more. So my question now is how can a search engine be known the description of the site if your not allowing they're crawler not to engage the protected directory where all your file is ?
  11. Good day, I have a task that require the page to be translated to other language. What the MAN want is to pass all the content of a page to an XML file and then translate all the content and return it in a language choosen. My question is, is this possible? if it is where will I start , cause I don't know really about XML. . By the way I'm using a framework codeigniter, I tried the localization function of the codeigniter and It was okay but it is not the MAN wants. Maybe anyone knows something about codeigniter that can help me. .
  12. Hello! I have the following code in my controller: $this->parser->parse('themes/default/index.php', $data); And getting error: However, when I type in the same url into the address bar, the page loads fine. I can't for the life of me figure out what's going on. Thanks in advance! ADDITIONAL INFO: Configs & Helpers are set as: //Commented lines I've tried. //$config['base_url'] = ''; //$config['base_url'] = 'http://localhost'; //$config['base_url'] = 'http://localhost/'; //$config['base_url'] = 'http://localhost/PB_MVC'; $config['base_url'] = 'http://localhost/PB_MVC/'; $autoload['helper'] = array('url'); My folder structure is: -PB_MVC --application --system --themes ---default
  13. Hello: I m having this foreach duplicated in returned data this happened when I upgraded to a news version of xammp and can t figure out why the duplicated are taking place... <?php if(isset($sess_uLOG) && $sess_uLOG==true) { $attrib = array('name'=>'fxxx','class' => 'fxxx'); echo form_open('main/profile',$attrib); ?> <ul class="cont_up"><!-- START section Overview--> <?php foreach ($u_profile as $u_pr) : ?> <li> <div class="sec_topic">Overview<span><?php $ubtn=array('name'=>'form_btn','value'=>'btn_save0','type'=>'submit','content'=>'Save');echo form_button($ubtn)?></span></div> <div class="profile_pic"> <img src="<?php echo base_url()."assests/imgs/profile/thumbs/".$u_pr->prof_pic; ?>" width="200" height="200" alt="<?php echo $u_pr->un; ?>"> </div> <div class="sec_content0"> <blockquote> <span>gender:</span><span> <SELECT name="ugender"> <?php @$u_gender=$this->input->post('ugender', TRUE); foreach ($ar_gender as $val_gender) { if ($u_gender != NULL && !empty($u_gender)) { echo "<option value='$val_gender'"; if ($val_gender == $u_gender) {echo " selected='selected'";} echo ">".$val_gender."</option>\n"; } else { echo "<option value='$val_gender'"; if ($val_gender == $u_pr->gender) {echo " selected='selected'";} echo ">".$val_gender."</option>\n"; }//END if else post } ?> </SELECT> <span>name:</span> <span> <input type="text" name="ufname" value="<?php echo isset($_POST['ufname']) ? $_POST['ufname'] : $u_pr->ufn; ?>" maxlength="12"> <input type="text" name="ulname" value="<?php echo isset($_POST['ulname']) ? $_POST['ulname'] : $u_pr->uln; ?>" maxlength="12"> </span> <span>username:</span> <span><input type="text" name="uname" value="<?php echo isset($_POST['uname']) ? $_POST['uname'] : $u_pr->un; ?>" maxlength="18"></span> <span>country:</span><span> <SELECT name="ucountry"> <?php @$u_count=$this->input->post('ucountry'); foreach ($country as $value) { if ($u_count != NULL && !empty($u_count)) { echo "<option value='$value'"; if ($value == $u_count) {echo " selected='selected'";} echo ">".$value."</option>\n"; } else { echo "<option value='$value'"; if ($value == $u_pr->u_country) {echo " selected='selected'";} echo ">".$value."</option>\n"; }//END if else post } ?> </SELECT> </span> <span>phone: +</span><span><input type="text" name="uphone" value="<?php echo isset($_POST['uphone']) ? $_POST['uphone'] : $u_pr->u_phone; ?>" maxlength="18"></span> </blockquote> </div> </li> <?php endforeach; ?> </ul><!-- END section Overview--> <?php echo form_close(); }else{ .... }
  14. Hello: I m facing an issue with codeigniter encode encrypt decode, different results for the same string each time... thought the I m still on same server and same key been using for couple of days...
  15. $_FILE uploading is empty. I've been doing this upload 2 days but my image file won't move to the site directory, and I dump the $_FILES I see that everytime I post It returned empty, but on my localhost (pc that I'm using) it is working. On the site using IIS7 server, I see the file return everytime I upload on the windows/temp, but the file not moving to the directory of the site. I already use 3 plugin's for uploading but still it won't do. I am using codeigniter framework. Anyone can give an idea about the problem?
  16. A big Sigh Day! I have a project site running on IIS7. I'd created a PHP function for file uploading, it mas working fine on my localhost (not on the server localhost). But when I tried to implement it on the site on the server It wont move the file on the site directory, I check the TEMP for PHP file uploading , it is creating a file on the WINDOWS/TEMP everytime I'm uploading, but not moving the file on the site file directory. I have also created a NETWORK SERVICE for permission purposes, I have also check the folder permission NETWORK SERVICE and IIS_IUSRS already full control on the folder. I'm using old version of codeigniter framework. Anyone know why It won't move the file unto the site directory?? Thanks and regards
  17. Is it possible to trigger form validation error from the Model or Controller to target validation_errors(); used in a form? Ex: ///////////////view.php//////////// $att = array('name'=>'x','class' => 'y', 'id' => 'z'); echo form_open('.../...',$att);?> .... ...... /////////////////////////////////// ///////////////model.php or controller.php//////////// function tst(){ ....validation code... then... trigger custom error for the validation_errors() in the view.php /////////////////////////////////////////////////////
  18. Is it possible to trigger form validation error from the Model or Controller to target validation_errors(); used in a form?
  19. How safe is to rely on codeigniter own encryption key..? If you used encryption key do you have to encrypt the config.php file? Any ideas aside from storing the key into the db then loading it to the config.php which in turn might pose a bit of performance issue but still might be better solution...
  20. Hello: I'm using the following from the controller to call a method from the model but receiving and erro: //from the controller function getT(){ $th=$this->input->post('the', TRUE); $this->model_data->thCheck($th); }//END Fn getT() //from the model function thCheck($th=NULL){ echo $th; } yet I m receiving that error: Fatal error: Call to undefined method model_Data::thCheck() in ....\controllers\main.php on line 20
  21. Hello: I ve .css file with background images where paths are not working :/ ex: .cmd {background:url(/assests/theme/theme1/img01.png);} any work around since we can t use base_url() in css of course...
  22. Hello, I have a large form that can be built dynamically, user can add multiple fields and now I have problems with saving values to DB. I'm using codeigniter. This is my form and this is part of my controller that handle those inputs: $from = array(); foreach ($this->input->post('from') as $froms) { $from[] = $froms; } $to = array(); foreach ($this->input->post('to') as $tos) { $to[] = $tos; } $step = array(); foreach ($this->input->post('step') as $steps) { $step[] = $steps; } $odvisnost = array(); foreach ($this->input->post('odvisnost') as $dependency) { $odvisnost[] = $dependency; } And I get error: and 1st value is "productid" As you can see it tries to insert 'array' instead of values that I enter, I entered 2,3,4,5 and 6. My html form is correct with all inputs names as array[] for example: <input type="text" name="steps[]">
  23. Hello to all, I truly need help, first of all, I know basic php and I'ma front end developer so advice here would be greatly appreciated. I get these errors: Message: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/aphotel/public_html/application/config/config.php:1) Filename: classes/rapyd_session.php Line Number: 53 A PHP Error was encountered Severity: Warning Message: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/aphotel/public_html/application/config/config.php:1) Filename: classes/rapyd_session.php Line Number: 53 A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at /home/aphotel/public_html/application/config/config.php:1) Filename: libraries/Session.php Line Number: 366 It is going beyond my knowledge of php and I would help is greatly appreciated. Thank you
  24. Hi there i have several users created in my membership db table but since I added in my validateUsers function to my controller to make sure non registered users cannot sign into my site, registered users cannot log in either. Why is this? Controller: class Login extends CI_Controller { function Login() { parent::__construct(); $this->load->model('membership'); } function loguserin() { $this->load->helper(array('form', 'url')); $this->load->library('form_validation'); $this->form_validation->set_rules('username', 'Username', 'required|min_length[4]|max_length[12]|callback_validateUser|trim'); $this->form_validation->set_rules('password', 'Password', 'required|md5|trim'); $username = $this->input->post('username'); $password = $this->input->post('password'); if ($this->form_validation->run()) { $this->validateUser($username, $password); $this->session->set_userdata('status', 'OK'); $this->session->set_userdata('username', $username); redirect('home'); } else { $this->session->set_userdata('status', 'NOT_OK'); $this->load->view('shared/header'); $this->load->view('account/logintitle'); $this->load->view('account/loginview'); $this->load->view('shared/footer'); } } function validateUser($username, $password) { $this->db->select('*')->from('membership'); $this->db->where('username', $username); $this->db->where('password',MD5($password)); $query = $this->db->get(); if ($query ->num_rows ==1) { return true; } else { var_dump($username, $password);// this only seems to throw back the username, not the password, don't know why $this->form_validation->set_message('validateUser', 'Invalid username/password'); return false; } } function index() { $this->load->view('shared/header'); $this->load->view('account/logintitle'); $this->load->view('account/loginview'); $this->load->view('shared/footer'); } Thanks for the help
  25. Please help! i can't connect codeigniter to Oracle I am trying to connect Codeigniter to Oracle 11g, here are my settings Settings in database.php: $active_group = 'default'; $active_record = TRUE; $db['default']['hostname'] = "//localhost/"; $db['default']['username'] = 'xxxxxxx'; $db['default']['password'] = 'xxxxxxx'; $db['default']['database'] = 'orcl'; $db['default']['dbdriver'] = 'oci8'; $db['default']['dbprefix'] = ''; $db['default']['pconnect'] = TRUE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; $db['default']['cachedir'] = ''; $db['default']['char_set'] = 'utf8'; $db['default']['dbcollat'] = 'utf8_general_ci'; $db['default']['swap_pre'] = ''; $db['default']['autoinit'] = TRUE; $db['default']['stricton'] = FALSE; Note: I added the C:\instantclient_11_2 to environment variable to PATH. Oracle : oracle port number: 1521 oracle hostname: Home-pc database name: orcl Only when I run my CodeIgniter login code it shows this error message: A Database Error Occurred Unable to connect to your database server using the provided settings. Filename: D:\xampp\htdocs\ci\system\database\DB_driver.php Line Number: 124 But I can connect to Oracle when I run a simple php code like: <?php $conn = oci_connect("xxxxxx", "xxxxxx",""); if (!$conn) { echo "Not connected!"; } else echo "yahooooooooo!!!!!!!!!!"; ?> Result: yahooooooooo!!!!!!!!!!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.