Search Results

Search found 19375 results on 775 pages for 'codeigniter url'.

Page 11/775 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Entity-attribute-value model using codeigniter / php

    - by John Stewart
    SO I am trying to create a way to structure my database to be able customize forms. I looked into EAV pattern and here is my db structure: Table form - form_id - form_name - form_added_on - form_modified_at Table: form_fields - field_id - form_id - field_type (TEXT, RADIO etc..) - field_default_value - field_required Table: form_data - data_id - field_id - form_id - field_value so now I can store any custom form into the database and if I want to get the values for an individual form I can simply join it by "form_id" .. the problem: I want to be able to search through all the forms for a specific field value. How can I do that with EAV model? Also, I thought about just storing the custom data as a serialized (JSON) object but then I am not sure how can I query that data. Please note that I am using Codeigniter with MYSQL. So if conversation can use Codeigniter libraries if needed.

    Read the article

  • Codeigniter HTML & Apache, JPG & jpg

    - by romme86
    Hi i'm using codeigniter to save some jpg/JPG files on the webserver. The problem is i don't know if all of the files extension will be the same: jpg/JPG so on rendering i put a tag like this <img src="/.../name.JPG"/> in this way if the uploaded file is a .jpg it will not be displayed. the solution i'm going to use is a simple redundance of the tag HTML: <img src="/.../name.JPG"/> <img src="/.../name.jpg"/> this way if one is not rendered the other is i would like to know if this problem can be resolved in php or codeigniter by changing the file extension on upload.

    Read the article

  • site not working with url www

    - by jarus
    hello im having problem with my site when i type http://mysite.com it works fine but when i type http://www.mysite.com it displays page cannot be found , what is the problem i couldnot find , i tried .htaccess redirection also RewriteEngine On RewriteCond %{HTTP_HOST} ^www.mysite.com [nc] RewriteRule (.*) mysite.com/$1 [R=301,L] it is not working any help will be appreciated

    Read the article

  • file upload in existing site with jquery and codeigniter

    - by Sam
    I am a new bee to ajax world. I am working on a site which uses jquery and codeigniter which processes big files like 2GB. It basically parses file and stores some extracted data from it, it uses ajax to show how far the files have been processed etc. Now I want to change the way we process files. I want to first store the file on server side and then start the processing. I evaluated upload class of codeigniter but looks like I cannot use it for this purpose as this class works with field_name and I could not find a way to make an ajax call to the upload class. My questions is : What would be suitable for my problem? Thanks in advance, Sam

    Read the article

  • How do I include external Libraries in CodeIgniter?

    - by user259954
    I'm new to codeigniter, and I'm trying to integrate amazon's FPS into my page. There are a bunch of libraries and models that go with Amazon FPS, which I would need included to make the appropriate calls. How do I include them in CodeIgniter? I tried placing the entire Amazon folder inside the system/libraries directory, and then tried including libraries with $this-load-library( 'Amazon/FPS/Client' ); However, I run into problems with the relative path there, because Client.php contains the statement require_once ('Amazon/FPS/Interface.php'); ... which is in the same folder. There has to be a better way to do all this - can anyone please help? Thanks!!

    Read the article

  • Active menu tabs with codeigniter

    - by CyberJunkie
    Which method can be used in Codeigniter to achieve active menu tabs? For example I have a user menu Profile Friends Messages Logout When I'm in the profile controller the URL is domain.com/profile/some_function The Profile tab should be active by changing the background color for example. I would usually add php to the tabs to check for their corresponding URL segment and I would change the style of the active tab. In Codeigniter should I implement a helper? What function can I easily use in tabs?

    Read the article

  • Problem getting CodeIgniter working with WAMP

    - by musoNic80
    I've been developing a project based on CodeIgniter on my MacBook Pro. For reasons I don't need to go into I've now had to move my work onto a PC running Windows XP. I've installed WAMP and brought my existing project into the www folder. Unfortunately, when I try and access the project via localhost it throws up include errors. It seems that for some reason the constants APPPATH and BASEPATH seem to be incorrect. I've checked the index.php file and it all seems ok. I've also downloaded a fresh version of CodeIgniter and placed that in my www folder. I can access the welcome message without any problems. Any ideas?

    Read the article

  • URL Rewrite problem. (Many directory)

    - by marharépa
    Hello! I'd like to make a htaccess file, which can make a good structure for my websites. My .htaccess is now: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$ RewriteCond %{REQUEST_URI} !^/admin/* RewriteRule ^(.*)$ index.php?q=$1 [QSA] (based on Sombat's comment) And I want to make this, with it: for every elements but (jpg|jpeg|gif|png|css|js|pl|txt) if domain.xx/admin redirect to the domain.xx/admin directory and don't make a rewrite at all i mean: let me use domain.xx/admin/index.php?asd=1&asdd=2 else rewrite everything as rule one, to index.php. Thanks for the help.

    Read the article

  • PHP/Codeigniter FTP Timout

    - by Jack Hayter
    I'm trying to access an FTP server from my PHP script using Codeigniter's FTP Library. These functions work great, but when testing the script I discovered that if I attempt to connect to a server that does not exist, the script does not terminate with an error message of any kind. The page continues to execute, until the web server gives up, returning an empty document. So I am wondering, is there a way to limit the amount of time that Codeigniter can try to connect to an FTP server, then display a message if that times out? I tried using the php function set_time_limit(), but it does not behave how I expected it to. Thanks for your help.

    Read the article

  • Make Codeigniter ignore directory

    - by Noah Goodrich
    I have Codeigniter installed and working for my main site. But I am now trying to add an add-on domain to the same hosting account, so I can have two sites running on the same hosting. Add-on domains make a new folder in the main public_html folder to store the web files. How can I get Codeigniter to ignore this directory? The site doesn't load properly when I try and view it. I have an SSL on the main site too and redirection for www URLS. Here's my .htaccess file: RewriteEngine on Options +FollowSymLinks RewriteBase / RewriteCond %{HTTP_HOST} ^www\.mysite\.co.uk$ [NC] RewriteRule ^(.*)$ http://mysite.co.uk/$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} (site|sections|here) RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] RewriteCond %{HTTPS} onsite|sections|here) RewriteRule ^(.*)$ http://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

    Read the article

  • CodeIgniter Question: How to delete records using ActiveRecord with mySQL function as WHERE conditio

    - by Jhourlad Estrella
    I have a table named ChatSessions where I keep track of active users in the chatroom. I need to prune expired user sessions from the table every 10 minutes. Using pure php-mysql is plain simple but I'm totally clueless how to convert this into ActiveRecord in CodeIgniter. The plain SQL query is below: SELECT * FROM `ChatSessions` WHERE `SessionExpires` < DATE_SUB( NOW( ) , INTERVAL 10 MINUTE ) Can anybody tell me what is the equivalent code in CodeIgniter using ActiveRecord? Thanks in advanced.

    Read the article

  • Optional URL fragment in Codeigniter?

    - by DA
    This is maybe a simple syntax question or possibly a best-practices question in terms of codeigniter. I should start by saying I'm not a PHP or Codeigniter person so trying to get up to speed on helping on a project. I've found the CI documentation fairly good. The one question I can't find an answer to is how to make part of a URL optional. An example the CI documentation uses is this: example.com/index.php/products/shoes/sandals/123 and then the function used to parse the URI: function shoes($sandals, $id) For my example, I'd like to be able to modify the URL as such: example.com/index.php/products/shoes/all So, if no ID is passed, it's just ignored. Can that be done? Should that be done? A second question unrelated to my problem but pertaining to the example above, why would the variable $sandals be used as in the example, the value is 'sandals'? Shouldn't that variable be something like $shoetype?

    Read the article

  • Help with search query in Codeigniter

    - by Indigo
    Hi All, Im still fairly new to codeigniter and am wondering if someone can help me with this please? Im just trying to do a very basic search query in Codeigniter, but for some reason, the results are ignoring my "status = published" request... The code is: $this->db->like('title', $term); $this->db->or_like('tags', $term); $data['results'] = $this->db->get_where('resources', array('status' => 'published')); And this dosent work either: $this->db->like('title', $term); $this->db->or_like('tags', $term); $this->db->where('status', 'published'); $data['results'] = $this->db->get('resources'); Im sure its something basic? Help please?

    Read the article

  • codeigniter problem with mod_rewrite on apache 1.3

    - by Shawn
    Anybody came into this before? Hosting a site on godaddy, the site is developed in codeigniter framework(php), to get pretty url, put this into .htacess RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] problem is only domain.com/index.php seems to work, other urls e.g domain.com/user/login won't work, codeigniter always returns '404 page'. Is there anything going on with godaddy's mod_rewrite or just their apache which as I know is version 1.3. Any clue? [update] a bit CI debug, found /system/libraries/Router.php line 239, line show_404( $segments[0] ); always gets invoded. $segments [ 0='index.php' ], that seems to be the problem, but why? All works on my dev box which is in apache2

    Read the article

  • I can't delete record in Codeigniter

    - by jomblo
    I'm learning CRUD in codeigniter. I have table name "posting" and the coloumns are like this (id, title, post). I successed to create a new post (both insert into database and display in the view). But I have problem when I delete my post in the front-end. Here is my code: Model Class Post_Model extends CI_Model{ function index(){ //Here is my homepage code } function delete_post($id) { $this->db->where('id', $id); $this->db->delete('posting'); } } Controller Class Post extends CI_Controller{ function delete() { $this->load->model('Post_Model'); $this->Post_Model->delete_post("id"); redirect('Post/index/', 'refresh'); } } After click "delete" in the homepage, there was nothing happens. While I'm looking into my database, my records still available. Note: (1) to delete record, I'm following the codeigniter manual / user guide, (2) I found a message error (Undefined variable: id) after hiting the "delete" button in the front-end Any help or suggestion, please

    Read the article

  • sending an url but staying on the same page ( php, codeigniter, javascript )

    - by user1776815
    this is my situation. I'm writing an webinterface in codeigniter to send commands to a virtual server. these commands are passed through the browser in an url. example : http://server.com/TgtSendIRCommand?id=UM-02&code=KEY_UP this server then takes action and the web interface refreshes the screenshot. i just want to have a bunch of links in html that send this command to the browser. But if i click the links, the user has to stay on the same page. So the command is sended but there is no other interaction. i am using codeigniter. Any suggestions ?

    Read the article

  • Debug Mode for CodeIgniter?

    - by user350814
    Does CodeIgniter provide a Debug Mode, for example, when accessing an Invalid URL? Ruby on Rails does show debugging Messages when a incorrect URL has been given, and the controller is unable to resolve it using the routes map. How would I enable such debugging messages in CodeIgniter? The profiler ... $this->output->enable_profiler(TRUE); ... only affects single classes, but not all routes. So debugging without an actual debugger mode is a little... difficult. :-)

    Read the article

  • URL is generating a /#!/splash-page

    - by user32642
    My site for some reason is generating a shebang - /#!/splash-page on the URL. For example when I type www.modernvintage1005.com, the browser returns www.modernvintage1005.com/#!/splash-page and every subsequent page is /#!/about, /#!/contact, and so forth. There's absolutely nothing on the Google about this. There is a lot of rewrite help to eliminate .index.php from the home page, but that's it. How do I rewrite it to just say domain.com and domain.com/about.html, etc.? Here is my .htaccess file if you need to see it. # Rewrite Rule <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # compress text, html, javascript, css, xml: <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript AddType x-font/otf .otf AddType x-font/ttf .ttf AddType x-font/eot .eot AddType x-font/woff .woff AddType image/x-icon .ico AddType image/png .png </IfModule> ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 2 days" </IfModule> ## EXPIRES CACHING ##

    Read the article

  • Should I use subdomains or subfolders for my user groups?

    - by bilygates
    Hello, I run a photography website where each user has its own subdomain (i.e. user.site.com). I'm thinking of adding user groups but I'm unable to decide if I should also associate a separate subdomain or simply a subfolder for each group: Subfolders (www.site.com/groups/my-group) Pros: Easier to maintain from a tehnical p.o.v. Cons: Harder to memorize. The URLs can get really long (www.site.com/groups/my-group/albums/my-album/) Subdomains (my-group.site.com) Pros: Easier to memorize. Shorter URLs. One might have the impression that such an URL is somewhat more "independent" from the main site. Cons: Group and user names belong to the same name space, so we need to check for collisions when creating a new user/group. One cannot determine the content of the page by only reading the URL: Is x.site.com a user page or a group page? What's your opinion on the matter? I should note that DeviantArt.com uses the 2nd option (that's where I got the idea). Thank you in advance!

    Read the article

  • wrong return value with jquery ajax and codeigniter

    - by matthew
    I do not know if this is specifically a jquery problem, actually I think it has to mostly do with my logic in the php code. What Im trying to do is make a voting system that when the user clicks on the vote up or vote down link in the web page, it triggers an ajax call to a php function that first updates the database with with the required value, on success of the database updating the another function is called just to get the required updated html for the that particular post that the user has voted on. (hope I havnt lost you). The problem I think deals with specifically with this one line of code. When I make the call it only returns the value of $row-beer_down and completly ignores everything else in that line. Funny thing is the same php code to display the html view works perfectly before the ajax function updates it. echo "<p>Score " . $row->beer_up + $row->beer_down . "</p>"; so here is the code to hope you can help as I have absolutely no idea how to fix this. here is the view file where it generates the page. This part is the query ajax function. <script type="text/javascript"> $(function() { $(".vote").click(function(){ var id = $(this).attr("id"); var name = $(this).attr("name"); var dataString = 'id='+ id ; var parent = $(this); if(name=='up') { $.ajax({ type: "POST", url: "http://127.0.0.1/CodeIgniter/blog/add_vote/" + id, data: dataString, cache: false, success: function(html) { //parent.html(html); $("." + id).load('http://127.0.0.1/CodeIgniter/blog/get_post/' + id).fadeIn("slow"); } }); } else { $.ajax({ type: "POST", url: "http://127.0.0.1/CodeIgniter/blog/minus_vote/" + id, data: dataString, cache: false, success: function(html) { //parent.html(html); $("." + id).load('http://127.0.0.1/CodeIgniter/blog/get_post/' + id).fadeIn("slow"); } }); } return false; }); }); </script> Here is the html and php part of the page to display the post. div id="post_container"> <?php //echo $this->table->generate($records); ?> <?php foreach($records->result() as $row) { ?> <?php echo "<div id=\"post\" class=\"" . $row->id . "\">"; ?> <h2><?php echo $row->id ?></h2> <?php echo "<img src=\"" . base_url() . $dir . $row->account_id . "/" . $row->file_name . "\">" ?> <p><?php echo $row->content ?></p> <p><?php echo $row->user_name ?> On <?php echo $row->time ?></p> <p>Score <?php echo $row->beer_up + $row->beer_down ?></p> <?php echo anchor('blog/add_vote/' . $row->id, 'Up Vote', array('class' => 'vote', 'id' => $row->id, 'name' => 'up')); echo anchor('blog/minus_vote/' . $row->id, 'Down Vote', array('class' => 'vote', 'id' => $row->id, 'name' => 'down')); echo anchor('blog/comments/' . $row->id, 'View Comments'); ?> </div> <?php } ?> here is the function the ajax calls when it is successfull: function get_post() { $this->db->where('id', $this->uri->segment(3)); $records = $this->db->get('post'); $dir = "/uploads/user_uploads/"; foreach($records->result() as $row) { echo "<div id=\"post\" class=\"" . $row->id . "\">"; echo "<h2>" . $row->id . "</h2>"; echo "<img src=\"" . base_url() . $dir . $row->account_id . "/" . $row->file_name . "\">"; echo "<p>" . $row->content . "</p>"; echo "<p>" . $row->user_name . " On " . $row->time . "</p>"; echo "<p>Score " . $row->beer_up + $row->beer_down . "</p>"; echo "<p>Up score" . $row->beer_up . "beer down" . $row->beer_down . "</p>"; echo anchor('blog/comments/' . $row->id, 'View Comments'); echo "</div>"; }

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >