probleme with MVC/ code Igniter


I’m new and noob :slight_smile:

i have a probleme, i use Code Igniter with the MVC model…

the i have (View, Controller, and model)

i suppose the javascript is in the view…

then at the same level as views , controllers, and model i have a directory fore my schedule

and in my view i have scedule.php and i call some .js in the schedule directory but it doesn’t work…

I join a screen to be better understood ^^

and my code

As far as I know, relative links as “…/schedule/” may not work in case of Code Igniter, because it handles URI processing on its own, and you need to configure a route for “scheduler” folder as for folder with static files.

Yes you are right, i have to put my directory in the same level as application and system

i have a probleme again, i can’t connect the scheduler to a Database. but i don’t see where i made a mistake.

is there a probleme with codeigniter and scheduler ? for db connection…

i have use sample, but don’t work

thanks to help me

here is my page to display my scheduler

and here is my connector.php

Is anything was written to the “log.txt” ?

Code looks correct so the problem can be in paths, the next line
assumes that connector.php is placed on the same level as static html page

yes it’s in the same level, in fact i found th eprobleme it’s in the path.

i write the complete path and it’s works

thanks you

Hi, Did you get it to work?

I seem to be stuck, where it will not render the scheduler, but if I have the files in a different directory away from CodeIgniter, then it works.
I have copied the files needed for the scheduler in the same directory, in order to avoid the path changes, as I struggled with that as well.

I do apologize for being very new at this, but I am slightly frustrated in not getting this easy step to work.

The attached contains:

sample dhtmlxscheduler file (originally called 01_basic_init.html, just changed the paths, added to to see if some execution is happening):
[list] * calendar2.php
standard dhtmlxscheduler files

* dhtmlxscheduler.css            
* dhtmlxscheduler.js
* dhtmlxscheduler_debug.js
* events2010.xml

All of the above files went into the \views directory

from \controllers

  • calendar.php

The contents of \controllers\calendar.php

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Calendar extends CI_Controller {

	public function index()
                echo 'v1.00';

Contents of \views\calendar2.php (located in

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	<script src="dhtmlxscheduler_debug.js" type="text/javascript" charset="utf-8"></script>
	<link rel="stylesheet" href="dhtmlxscheduler.css" type="text/css" media="screen" title="no title" charset="utf-8">

<style type="text/css" media="screen">
	html, body{

<script type="text/javascript" charset="utf-8">
	function init() {
		scheduler.config.multi_day = true;
		scheduler.config.xml_date="%Y-%m-%d %H:%i";
		scheduler.init('scheduler_here',new Date(2010,7,5),"week");

<body onload="init();">
	test3 gus
	<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
		<div class="dhx_cal_navline">
			<div class="dhx_cal_prev_button">&nbsp;</div>
			<div class="dhx_cal_next_button">&nbsp;</div>
			<div class="dhx_cal_today_button"></div>
			<div class="dhx_cal_date"></div>
			<div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
			<div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
			<div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
		<div class="dhx_cal_header">
		<div class="dhx_cal_data">

Any help will be greatly appreciated!
I am stumped as to why EasyPHP will render it without problems, but as soon as it goes into the CI application directory, it no longer renders.

Gustav (66 KB)