Jump to content

undetected file again help


sasori

Recommended Posts

here's the screenshot of the error

35cjzaf.jpg

 

here's the function where the Elements.php file was suposed to be called via require()

private function getUpdateForm()
    {
      //create form
      $form = new Zend_Form();
      $form->setAction('update');
      $form->setMethod('post');
      $form->setAttrib('sitename','loudbite');

      //load elements class
      require "Form/Elements.php";

      $LoudbiteElements = new Elements();

      //Create username field
      $form->addElement($LoudbiteElements->getUsernameTextField());

      //create email field
      $form->addElement($LoudbiteElements->getEmailTextField());

      //create password field
      $form->addElement($LoudbiteElements->getPasswordTextField());

      //create textarea for about me
      $textAreaElement = new Zend_Form_Element_TextArea('aboutme');
      $textAreaElement->setLabel('About Me');
      $textAreaElement->setAttribs(array('cols'=>15,'rows'=>5));
      $form->addElement($textAreaElement);

      //create submit button
      $form->addElement('submit','submit');
      $submitElement = $form->getElement('submit');
      $submitElement->setLabel('Update My Account');

      return $form;
    }

 

here's the directory structure screen shot

2lcpmyq.jpg

 

as you can see the directory is correct but I dunno what's preventing the php file to get recognized

Link to comment
Share on other sites

The models directory is not on your include path.

 

even if I place it inside the index.php file, it doesn't help at all,

 


// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'),
    realpath(APPLICATION_PATH. '/models/'),
    get_include_path(),
)));

 

here's the new error when I placed it on the include_path and refreshed the same page

e61xxe.jpg

Link to comment
Share on other sites

The best thing to do with Zend (or any framework really) is to create your own directory for your libraries and keep everything in there, using the same conventions as Zend. The easiest place to put this is probably within the library directory right next to the Zend directory.

Link to comment
Share on other sites

The best thing to do with Zend (or any framework really) is to create your own directory for your libraries and keep everything in there, using the same conventions as Zend. The easiest place to put this is probably within the library directory right next to the Zend directory.

 

am sorry but it didn't really work

1) I place the Form directory inside the library directory

2) I tried placing the Elements.php file alone beside the Zend folder within the library

..based from your tip, this should have work but i still get the same error as posted on the screenshot

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.