Jump to content

leela

Members
  • Posts

    50
  • Joined

  • Last visited

    Never

Everything posted by leela

  1. Hi, Please URGENT ::::::::::: how to troubleshoot high-volume data loaders that take data from flat file / XML and load into MySQL ( QA testing ????) Please help me ..Are there any tools / methods we follow to test this. Waiting for ur reply, Ghanta
  2. Hi, My concept is to store the twitter results after searching for a keyword ( " leela " on http://search.twitter.com/ )and store the results in my local database. Can anyone give me idea how to start this ? Thanks for ur help, Leela
  3. Hi, I am having the issue regarding ROUTER .I am able to route index but not other actions .. If i comment the route code for index , then in url http://localhost/postblog/public/p/add can be able to go to add ..... why both index and add actions are not working at the same time.. we use 1.11 version My Files routes.ini [production] ;routes.login.type = "Zend_Controller_Router_Route" ; ----------------- USER ROUTING ----------------- routes.post.route = "/p/:action/*" routes.post.defaults.module = "Post" routes.post.defaults.controller = "posts" routes.post.defaults.action="index" routes.post.route = "/p/add" routes.post.defaults.module = "Post" routes.post.defaults.controller = "posts" routes.post.defaults.action = "add" [staging : production] [testing : production] [development : production] bootstrap.php <?php class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { public function init() { //Start session } protected function _initDoctype() { $this->bootstrap('view'); $view=$this->getResource('view'); $view->doctype('XHTML1_STRICT'); } protected function _initAutoload() { $aModules = array( 'Post' ); foreach ($aModules as $module) { $loader = new Zend_Application_Module_Autoloader( array( 'namespace' => $module, 'basePath' => APPLICATION_PATH . '/modules/'.$module, )); $loader->addResourceType('form', 'forms', 'Form') ->addResourceType('controller', 'controllers', 'Controller') ->addResourceType('model', 'models', 'Model') ->addResourceType('dbtable', 'models/DbTable', 'Model_DbTable') ; } } protected function _initRoutes() { /** * Set Routing */ $routeConfig = new Zend_Config_Ini("../application/configs/routes.ini", APPLICATION_ENV); //TODO: Get environment from Apache config or environment variable $router = new Zend_Controller_Router_Rewrite(); Zend_Controller_Front::getInstance()->getRouter()->addConfig($routeConfig, 'routes'); } /*protected function _initPlugins() { $this->bootstrap('FrontController'); $front = $this->getResource('FrontController'); * * Register plugins * The alternative way is that put plugin to /application/config/application.ini: * resources.frontController.plugins.pluginName = "Plugin_Class" $front->registerPlugin(new Etg_Controller_Plugin_Init()); } */ } ?> my Application.ini [production] phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 includePaths.library = APPLICATION_PATH "/../library" bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" appnamespace = "Application" resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" resources.frontController.params.displayExceptions = 0 resources.view[] = resources.db.adapter = PDO_MYSQL resources.db.params.host = localhost resources.db.params.username = root resources.db.params.password = root resources.db.params.dbname = zendblog resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/" resources.modules[]="" resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" [staging : production] [testing : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 [development : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 resources.frontController.params.displayExceptions = 1 Thanks for ur help, Leela
  4. Thanks alot.. This is what i am looking for ! Ghanta
  5. Hi, We are working on the project where the style theraphists , fitness trainers all logon to my site and create own page , giving details about them , so that the customers can book them online .. in ZEND FRAMEWORK I want to make the statistical ( BAR GRAPH ) representation to admin, so that admin knows how many users registered/book those ? how many money they are paying online to those trainers .. How can i make this data as a graph .. Any suggestions or links to the sample code , so that i can integrate to my site .. Thanks alot, Ghanta
  6. Hi , I have a requirement like : "Our product is an affordable and extremely easy to use online web platform geared towards small independent businesses (fitness trainers, massage therapist, yoga instructors, hair stylists etc) to 1. Help them establish an online presence (website) 2. Provide them with a dashboard to view the statistics of their business (backend analytics) 3. Accept Online scheduling and payments 4. Leverage social media to acquire new customers, engage current customers and earn loyalty" Which framework or oops or plain php suits this application well . we are familiar with Codeigniter, Cakephp , and oops as well ...... Suggest us ,pls Thanks, Leela Sorry if i have posted in somewhere wrong window !
  7. Hai, I did the posts module in cakephp.Able to add,edit,delete functions.. Now i was trying to add comments to posts already existed.. How to pass post_id ( foreign key to columns table )as hidden to comments_controller -->add() function .. my code is class commentsController extends AppController { var $helpers=array('Html','Form'); var $name='Comments'; function add() { if(empty($this->data)) { $this->set('comment',$this->Comment->read()); } else { if($this->Comment->save($this->data)) { $this->Session->setFlash('The comment for this has been saved'); $this->redirect(array('action'=>'index')); } else { $this->Session->setFlash('Comment is not saved'); } } } } ?> and views/comments/add.ctp is <h2>Add Comments</h2> <?php echo $form->create('Comment',array('action'=>'add'));?> <?php echo $form->input('name');?> <?php echo $form->input('email',array('type'=>'email'));?> <?php echo $form->input('text');?> <?php echo $form->input('post_id',array('type'=>'hidden')) ;?> <?php echo $form->end('Add Comment');?> the url is http://localhost/cakephp/posts/ ----> Id Title Body View Delete Action Action 1 The title This is the post body.sdfsdf View Delete AddComment ViewComment When i click AddComment[/b the url is :::::::: http://localhost/cakephp/comments/add/1 here is the form to add title,text,comment ----------->When i submit ,it is giving ......... SQL Error: 1048: Column 'post_id' cannot be null INSERT INTO `comments` (`name`, `email`, `text`, `post_id`, `created`) VALUES ('ss', '[email protected]', 'sample text ', NULL, '2011-07-20 11:26:50') Post_id is not passing ............How can i pass this post_id,so that i can do add comment Thanks in advance
  8. Thanks..it is hidden,i used cntrl + H to unhidden it
  9. did i do anything wrong in installing? or does 1.3.10 version has htaccess file somewhere ?
  10. hai, I installed cakephp 1.3.10 version today. I cannot find .htaccess file under CAKE , i have remaining folders..app,cake,plugins,vendors,index.php and README. Please help me where can i find it.
  11. leela

    mvc .

    Hi, I am trying to implement mvc to the clumpsy code where php,html are together.. how can i separate html from php.. i have mysql.php-->where connection to databse exists. classfunc.php-->where all functions required for viewing the data are there.. view.php-->where the html file is there.. how can i combine these 3 files. without using a single echo or print can the html exists ..? for displaying the data .. here is view.php <?php include_once("MYSQLDB.php"); include_once("classFunc.php"); include_once("classFuncSF.php"); $link=MYSQLDB::connect('localhost','root',''); classFuncSF::do_list($link); ?> <table border=1 cellpadding=3 style="font-size:11px;font-family:verdana;background-color:e4e4f4;"> <tr><td colspan=10 align=center><b>Customer List</b></td> <tr align=center> <?php foreach ($columns as $column ) { ?> <td align=center><b><?php echo $column; ?></b></td> <?php } ?> i dont want even these echoes here........Please don't suggest to use any frameworks now.... Thanks in advance
  12. hi, here i didnot find any use of _call ? what is the use.......can i use base class area () for child class triangle and rectangle too ...... please tell me
  13. Thanku so much......next time, if i post code,definitely i would post code in or [code=php:0]
  14. Hai all, i have an abstract class , from there i extended the child class, i extended further and made it as final..and i was trying to overload parent methods ..but i cannot overload parent methods using _call..pleadse can anyone help me out.. here is my code : abstract class Shape { protected $length; protected $height; protected $a; protected $b; protected $c; public function getCoordinates($length,$height) { $this->length=$length; $this->height=$height; } public function getSides($a,$b,$c) { $this->a=$a; $this->b=$b; $this->c=$c; } abstract public function area(); abstract public function perimeter(); abstract public function display(); } class rectangle extends Shape { public function area() { return round(($this->length)*($this->height),2); } public function perimeter() { return round(2*(($this->a)+($this->b)),2); } public function display() { echo "area is :". rectangle::area() . "<br>"; echo "perimeter is : ". rectangle::perimeter() ."<br>"; } } final class triangle extends rectangle { function __call($method_name, $arguments) // this is wrong ........please modify here to call area(),which is in shape class(); { $accepted_methods = array("getCoordinates","area","perimeter"); } // this is wrong, i know......i want to overload area() in parent class to overload ..how ? public function area() { return round((($this->length)*($this->height)*($this->width)/2),2); } public function perimeter() { return round((($this->a)+($this->b)+($this->c)),2); } public function getCoordinates($length,$height,$width) { $this->length=$length; $this->height=$height; $this->width=$width; } public function display() { echo "area is :". triangle::area() . "<br>"; echo "perimeter is : ". triangle::perimeter() ."<br>"; } } $r=new rectangle(); $r->getCoordinates(1,2,4); $r->getSides(6,2); $r->display(); $ot = new triangle(); $ot->getCoordinates(1,2,4); $ot->getSides(6,2,3); $ot->display(); thanks in advance ...
  15. hello, my problem is : i am able to set and get the properties using files , but i want to create from command line.. here is my code switch($argv[1]) { case 4: while (list($key, $value) = each($php_arr)) { if(array_key_exists($argv[2],$php_arr)!='') { echo $php_arr[$argv[2]]; $php_arr[$argv[2]]=ini_set($argv[2],$argv[3]); } else {echo "keyword not found";} } print_r($php_arr); break; default: print_r($php_arr); } the above code works if i give values root@ubuntu:/var/www/assign2/sel# php -q test.php 4 max_execution_time 30 BUt i want to ask for value to enter , suppose it is case 1 , then after entering 1 ..then it shud again ask for values ... can anyone give idea.. Thanks, leela
  16. leela

    arrays

    thanks...after reading all arrays functions , i got a little confused thanks
  17. leela

    arrays

    is there any function in arrays so that i want to keep the same key ,remove the current value and assign new value...... i tried array_fill_keys but it works for all keys........ pls help;;; in config.php , i want max_upload_limit 3 mb ......so i want to change the value , keep tje same key thanks.
  18. Hi , I am a newbie to php .. please help me out.. Write configuration file in form of array(key/value) with any 5 properties. Then write command line PHP to get/set any property. Also write code to convert array based conf file into XML please help me .... i used parse_ini_conf to convert configuration file to array .. but how to use command line php to set and get property.. thanks, leela
×
×
  • 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.