balusamy
08-21-2008, 07:53 AM
HI
I have started cake php project. I have create file in this way but I get error 404 Not Found error
First I create database
/app/config/database.php
<?php
class DATABASE_CONFIG
{
var $default = array('driver' => 'mysql',
'connect' => 'mysql_pconnect',
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => 'testcakephp' );
}
?>
2. I create models
/app/models/testcakephp.php
<?php
class Testcakephp extends AppModel {
var $name = 'testcakephp';
}
?>
3. I create controller
/app/controllers/testcakephp_controller.php
<?php
class TestcakephpController extends AppController {
var $name = 'testcakephp';
function index() {
$this->set("msg","Welcome");
//$this->set('testcakephp', $this->Post->find('all'));
}
}
?>
4. I create index file
/app/views/testcakephp/index.thtml
<?php echo $msg ?>
In the above way i created but when I run my application
http://localhost/mycake/testcakephp/index
I got this below error.
Not Found
The requested URL /mycake/testcakephp was not found on this server.
Apache/1.3.33 Server at localhost Port 80
Kindly let me know what I make mistake.
Thanks
Best regards
Balu
I have started cake php project. I have create file in this way but I get error 404 Not Found error
First I create database
/app/config/database.php
<?php
class DATABASE_CONFIG
{
var $default = array('driver' => 'mysql',
'connect' => 'mysql_pconnect',
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => 'testcakephp' );
}
?>
2. I create models
/app/models/testcakephp.php
<?php
class Testcakephp extends AppModel {
var $name = 'testcakephp';
}
?>
3. I create controller
/app/controllers/testcakephp_controller.php
<?php
class TestcakephpController extends AppController {
var $name = 'testcakephp';
function index() {
$this->set("msg","Welcome");
//$this->set('testcakephp', $this->Post->find('all'));
}
}
?>
4. I create index file
/app/views/testcakephp/index.thtml
<?php echo $msg ?>
In the above way i created but when I run my application
http://localhost/mycake/testcakephp/index
I got this below error.
Not Found
The requested URL /mycake/testcakephp was not found on this server.
Apache/1.3.33 Server at localhost Port 80
Kindly let me know what I make mistake.
Thanks
Best regards
Balu