Welcome Guest, Not a member yet? Register   Sign In
  Resizing image problem
Posted by: El Forum - 08-24-2007, 01:36 AM - No Replies

[eluser]K-C[/eluser]
I have been trying to resize an uploaded image to create thumbnail and never managed to create the thumbnail file in the folder, however I am able to upload the original file. PLease enlighten me on what's wrong in my code. My code is as follow.


$img = $this->upload->data();
$uploadDir = $basepath.'/imgs/test/';
// let's create a thumbnail while we're here.
$config['image_library'] = 'GD2';
$config['source_image'] = $img['file_name'];
$config['new_image'] = $basepath.'/imgs/thumb_'.$img['file_name'];
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 5;
$config['height'] = 5;

$this->load->library('image_lib');
$this->image_lib->initialize($config);
$this->image_lib->resize();


  How to install Code Igniter
Posted by: El Forum - 08-24-2007, 12:46 AM - No Replies

[eluser]Fahad Sultan[/eluser]
Dear Friends

I am new to codeigniter. I am having problem while installtion code igniter.

I am not know how to set the base url and what to set.

All the codeigniter file reside in E:\CodeIgniter and i have made a vitual directory to this folder as well like http://localhost/ci.

But when i run this directory only error shows nothing happend. can you please tell me how to get out of this problem ?

This error come while opening the virtual directory.

HTTP 404 - File not found
Internet Information Services

Please help me out!

Thanks


  customize function
Posted by: El Forum - 08-24-2007, 12:45 AM - No Replies

[eluser]abbe01[/eluser]
Hi,
I am new to CI. Currently, I m converting my CMS project to using CI framework. I would like to know what is the proper way , if I would like to use my own custmize function which doesnt exist in CI? Should I build a new class or just simply attach to a new function file with put it same level with system folder.

Thanks.


  Loading error
Posted by: El Forum - 08-24-2007, 12:22 AM - No Replies

[eluser]emperius[/eluser]
I created a site on a local server and when I tried to move it to the hosting I get this error

A PHP Error was encountered

Severity: Notice

Message: Undefined property: CI_Loader::$load

Filename: helpers/application_helper.php

Line Number: 12


on line 12 in the application helper I try to load session library
$this->load->library('session');

What could be a problem?

I just noticed that I was testing on PHP4 server but hosting has PHP 5


  Escaping input with Active Record
Posted by: El Forum - 08-23-2007, 11:47 PM - No Replies

[eluser]stevefink[/eluser]
I noticed lately I'm doing quite a number of active record queries in this fashion:

$this->db->insert('makes', array('name' => $name));

I was just curious, is the CI engine escaping input when I use this method? I've already ran sanity code against $name, however escaping characters is always not to be taken for granted on any database manipulation.

Thanks,

- sf


  Suddenly, CI slow down!?
Posted by: El Forum - 08-23-2007, 09:50 PM - No Replies

[eluser]Unknown[/eluser]
I had well used some programs with CI.

My server consist of W2k, IIS, PHP5.2(ISAPI) and Mssql

but, today, suddenly,.. it returns very slowly.

I wonder why?

In my page, there're a few programs with CI as well as those without CI.

Only programs which are coded with CI is slow now.

I added some log_message() in my index.php

but.. whole index.php from log_message of first line to log_message of last line executed in 1 sec!!

and I found that IIS wrote less than 1 sec as elapsed time at IIS log.

so, I'm confused.

I'm trying to find out.?

I write another test simple CI program, but it is executed very fast.
and I add models, views, connecting database, and some.. , but it's still run fast.
( but it's still just a simple program. )



....


and now I think that does it take releasing resources?


Please help me, I'm exhausted now, and I must adjust programs before got fired! Sad

I know my messages are very disturbing some, but if you have any simple idea or if you experienced something like this situation,
please note me.

Thanks for your notice,
May the force be with you.


  $this->load->view() ???
Posted by: El Forum - 08-23-2007, 08:02 PM - No Replies

[eluser]CI_[/eluser]
I'm totally new to php and OOP specially in CI framework sorry for askin a stupid question like this but right now im totally mess-up... While im watching the Hello world tutorial i saw these functions... where did he get those??? were they from CI defined functions?

-------------------------------------------
<?php

class Blog extends Controller {

function index()
{
$this->load->view('blog_view');
}
}

?>
--------------------------------------------
thank you very much...


  How would you do this?
Posted by: El Forum - 08-23-2007, 06:06 PM - No Replies

[eluser]jnorris441[/eluser]
I am creating an online store system that will run many sites.

The approach I initially thought of was to keep the store core somewhere, and extend CI's Loader to use the core classes UNLESS there are classes specific to a certain site available.

Or maybe I could use routes to remap /category/view/1 to /mycoolstorecategory/view/1, so that I can have a mycoolstorecategory controller that extends the core category controller.

I'm already holding the views paths in an array that I can change per site, so that part is taken care of I guess.

How would you construct your app so that it can be easily upgraded but also customize the controllers and views per site?


  Remove HTML tags from a string
Posted by: El Forum - 08-23-2007, 05:29 PM - No Replies

[eluser]webdude[/eluser]
I would like to remove HTML tags from my db string.

Thanks


  Spot my Query error
Posted by: El Forum - 08-23-2007, 04:59 PM - No Replies

[eluser]Kemik[/eluser]
Hello,

Here's my code:

Code:
$query = "SELECT f.email, u.user_id
     FROM forgotten_password AS f
     LEFT JOIN users AS u ON f.email = u.email
     WHERE f.act_key = '$act_key'";
            
if ($query->num_rows() < 1) {
    show_error('Reset ID passed is not in the database');
}
            
$row = $query->row();
However I get "Call to a member function on a non-object" for the $query->num_rows().

Edit: Fixed - Add $query = $this->db->query($query); above the $query->num_rows() IF. I'm sure I did try that before but must have mistyped it.


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
Changing Session cookie -...
by paulbalandan
35 minutes ago
hot-reload side effects s...
by PaulC
6 hours ago
using app/Config/App.php ...
by sam547
Yesterday, 03:04 PM
Setting baseURL in Regist...
by grimpirate
05-15-2025, 02:20 PM
CRUD Code Generator
by DeanE10
05-15-2025, 05:31 AM
CodeIgniter.com - Report ...
by Harry Lyre
05-14-2025, 04:26 AM
Missing closing bracket w...
by abf
05-13-2025, 07:27 PM
Update from 4.6.0 to 4.6....
by FlavioSuar
05-13-2025, 04:17 AM
Sessions old files are de...
by InsiteFX
05-12-2025, 10:30 PM
Ajax post failing with Ty...
by PaulC
05-12-2025, 12:23 AM

Forum Statistics
» Members: 146,542
» Latest member: mu88uknetvn
» Forum threads: 78,392
» Forum posts: 379,464

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB