We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Please advcse How to use cakePHP Framework

kingroland
kingroland asked
on
Medium Priority
435 Views
Last Modified: 2013-11-10
Hello Mr.Expert,
Appreciated if you could advise how to use cakePHP. I am a  new beginner learning from scratch. I have uploaded all cakePHP files on my web host server ( folder structure as recommanded by cakePHP Manual.).

Thank I am not how go to next step.
My cakePHP default page on my server is at:

http://rolandhitech.com/cake/

Please advise how to proceed  next.
Thanks.
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2004
Commented:
You might want to see here:

http://www.scribd.com/doc/5503/CakePHP-tutorial-no-1-from-IBM

Be sure to see parts 2, 3, and 4 in the links to the right (or search the site if they are not present).

CakePHP may be an "easy do-it-yourself framework", but programming is the same no matter what tools you choose to use.  You'll need to be familiar with basic programming concepts at a minimum.  Design technique and application logic should not go amiss, either.

Good luck!

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Loganathan NatarajanLAMP Developer
CERTIFIED EXPERT

Commented:
Another simple tutorial about cakephp, here,
http://www.sitepoint.com/article/application-development-cakephp/
I think your best bet would be the CakePHP manual:
http://book.cakephp.org/

Author

Commented:
To

All Experts who have answered my question.......

Re: Please advcse How to use cakePHP Framework

Hello, thank you so much for your responses. I do really appreciated.
I have visited all your cakePHP tutorial urls. It helps a lot.
 
Unfortunatelty,
I still haven't found the solution and I am still get stuck.
I am a mid-level PHP programmer with 4 years of experience.
I am slow learner in cakePHP and hope you would not mind if I want
you to help me get out of this gridlock.
Please read till the end. Below ( 10 line of message) is previous Questio

Previous Question:
========================================
Hello Mr.Expert, Appreciated if you could advise how to use cakePHP. I am a  new beginner learning from scratch. I have uploaded all cakePHP files on my web host server ( folder structure as recommanded by cakePHP Manual.). Thank I am not how go to next step. My cakePHP default page on my server is at:
http://rolandhitech.com/cake/
Please advise how to proceed  next.
Thanks.
=====================================================



FURTHER EXPLANATION:(below)

Scenario
(1) I have successfully created all folder structures on my web host server
(exactly following instructions from cakePHP Manuals).
(2) All necessary files have been upoaded onto server.
(3) codes on cakePHP default page had been edited as per instructions
(4) That cakePHP default page (Welcome Page) is now displaying correctly
      and it can be viewed at http://rolandhitech.com/cake/
(5) Then I went through procedures from creating Model, View and controlers
      In other words, all steps have been taken from chapter "10.1.6 Create a Post Model"
      (http://book.cakephp.org/view/334/Create-a-Post-Model)
      to chapter 10.1.12 Editing Posts (  http://book.cakephp.org/view/340/Editing-Posts )

(6) Now MVC  structures is completed and when I tested the MVC index page at
     http://www.rolandhitech.com/cake/app/views/posts/index.php

     I received a bunch of error messages. Page did not work.

     Example message:

Notice: Undefined variable: posts in E:\Sites\Single7\kdesignings\webroot\cake\app\views\posts\index.php on line 54

     It looks like "Object (or) Function (or) variable Calls from MVC index page"  failed.

     It did fail because those called objects, functions and variables are located on
     files which are located inside other different folders. CakePHP Manual instructions
     told to place those files in that way. A per instructions, there is no "include" PHP scripts
     on that MVC index page (http://www.rolandhitech.com/cake/app/views/posts/index.php)

     I got stuck at this point and I don't know what to do next.
     An instructor at my college told me that I may need to edit a line of code in "PHP.ini"
    (PHP configuration file on my web host server to create link between "Calls from MVC Index page"
    and called objects/functions/variables in other folders.

     Is it the answer?

     If so, I may need to request Tech Support Tean of my web host (www.brinkster.com)

I need help your  now in order to solve this issue so that I can complete my PHP Project.

I am wondering if any Experts from Expert Exchange give me any advice regarding to this issue.
Could you please advise?

Your kind attention is highly appreciated. Thanks


----------------------------------------------------------------------------------------

MVC Index page code (below)


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Create a Post View</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {
      color: #CC0000;
      font-weight: bold;
      font-size: 16px;
      font-family: Arial, Helvetica, sans-serif;
}
.style2 {
      font-size: 10px;
      font-weight: bold;
      font-family: Arial, Helvetica, sans-serif;
}
.style3 {
      color: #0000FF;
      font-weight: bold;
      font-family: Arial, Helvetica, sans-serif;
}
-->
</style>
</head>






<body>
<table width="600" border="0" cellpadding="5" cellspacing="0" bgcolor="#CCCC99">
  <tr>
    <td width="20" valign="top"><a href="http://cakephp.org/"><img src="../../webroot/img/cake.icon.gif" width="20" height="20" border="0"></a></td>
    <td width="105" valign="top"><span class="style3">CakePHP</span><br>    <a href="http://cakephp.org/"><img src="../../webroot/img/cake.power.gif" width="98" height="13" border="0"></a></td>
    <td width="445" valign="top"><span class="style1"> 10.1.8 Creating Post Views<br>
    </span><span class="style2">http://book.cakephp.org/view/334/Create-a-Post-Model    </span></td>
  </tr>
</table>

<!-- File: /app/views/posts/index.ctp -->

<h1>Blog posts</h1>


<table>
   <tr>
      <th>Id</th><th>Title</th><th>Action</th><th>Created</th>
   </tr>
   <!-- Here's where we loop through our $posts array, printing out post info -->
   <?php foreach ($posts as $post): ?>    
   <tr>
      <td><?php echo $post['Post']['id']; ?></td>
        <td><?php echo $html->link($post['Post']['title'],'/posts/view/'.$post['Post']['id']);?></td>
        <td>
        <?php echo $html->link('Delete',"/posts/delete/{$post['Post']['id']}",null,'Are you sure?')?>
      <?php echo $html->link('Edit', '/posts/edit/'.$post['Post']['id']);?>
        </td>
        <td><?php echo $post['Post']['created']; ?></td>
   </tr>
     <?php endforeach; ?>  
 </table>


 
       <hr />
      
      <h1>View</h1>
       <!-- File: /app/views/posts/view.ctp -->
            <h1><?php echo $post['Post']['title']?></h1>
            <p><small>Created: <?php echo $post['Post']['created']?></small></p>
            <p><?php echo $post['Post']['body']?></p>
      
       <hr />
 
       <?php //echo $html->link("Add Post","/posts/add");?>
       <p><?php echo $html->link('Add Post','/posts/add');?></p>
      
       <!-- File: /app/views/posts/add.ctp -->  
       <h1>Add Post</h1>
         <?php
         echo $form->create('Post');
         echo $form->input('title');
         echo $form->input('body', array('rows' => '3'));
         echo $form->end('Save Post');
         ?>
        
 
          <hr />
        
       
      <!-- File: /app/views/posts/edit.ctp  -->      
        <h1>Edit Post</h1>
        <?php    
        echo $form->create('Post', array('action' => 'edit'));    
        echo $form->input('title');    
        echo $form->input('body', array('rows' => '3'));        
        echo $form->input('id', array('type'=>'hidden'));    
        echo $form->end('Save Post');
        ?>
 
 
 
</body>
</html>


















Jason C. LevineDon't talk to me.
CERTIFIED EXPERT

Commented:
kingroland,

Please post the above as a new question.  Your original question has been answered.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.