Jump to content

lostnucleus

Members
  • Posts

    90
  • Joined

  • Last visited

Everything posted by lostnucleus

  1. see you have analyzed my problem well , but I dont want flatten array , the whole purpose is to build multi dimensional arrays to mock the directory structure .Arrays inside other just as folder is inside other folder in directory structure.
  2. You have identified my problem well , but just missing one major part of it I want returning array to follow same hierarchy structure as that of direcorty iterator !! children key of array acts as a subfolder !!
  3. @kenrbnsn its an logical problem , i want to convert directory tree into specific array format , which I have showed you with example , code will be written only if there is a solution for this logical problem !!
  4. Hi consider I have following type of directory structure inside /root folder1 -fileName1.1 -folder1.2 --fileName1.2.1 $dirItr = new RecursiveDirectoryIterator('/root'); $itr = new RecursiveIteratorIterator($dirItr); $structure ; // the type of structure i want to build store inside it foreach($itr as $object) { //magic happens here } //in the end I want folowing type of structure $structure = array('label'=>'folder1','children'=>array(array('label'=>'fileName1.1'),array('label'=>'folder1.2','children'=>array(array('label'=>'fileName1.2.1'))))); Importan observations; a)children key is an array which contains arrays of other folder or filename; b) filename does not have children attribute because they are leafs of tree c) a folder without any files will be represented as array('label'=>'emptyFolderName',children=>array()) ; //children attribute with empty array. I wd be really thankfull to the user whoever solved this problem , wasted a month already on it !! thanks in Advance.
  5. kindly update to simply cuz http://www.google.com/trends?q=magento%2Cinterspire%2Czencart%2Coscommerce&ctab=0&geo=all&date=all&sort=0
  6. dude you are still not getting the point it got nothing to do with DOCTYPE , well I can make a php script to do exactly what you want here for 50 bucks.
  7. @r4nd yup return shd be replaced with the var name One particular use of this snippet comes handy with phtmls , where you are coding view part of MVC , <?= isset($this->memberName) ? $this->memberName : 'Welcome Guest'; ?>
  8. the above code is same as if(isset($_POST['testbox'])) { return $_POST['testbox']; }else { return null; } if the code behind ? , returns true then $textbox is set to wat comes just after ? , if it return false then $textbox is set to wat comes after : .
  9. try this $pTagElement = $html->find('div[id=main_content_content] p')->current();
  10. function check() { if (window.top!=window.self) { document.write("<p>This window is not the topmost window! Am I in a frame?</p>") } else { document.write("<p>This window is the topmost window!</p>") } }
  11. by php I mean programatic (automated) , you will need to create a table (url) in database with columns public url , and real url , every public url will have real url assosicated to it ( 1 to 1 relationship) , here real url = your affilate url which you want to hide, you will show public url e.g http://yoursite.com/magic.php?public_url = 12345 when user click on this url , you will do select real_url from url where public_url = 12345 , , now store the real_url , in $real_url return <html> <head> <title>My site name</title> <meta name="description" value="som discription"> <meta nam="keywords" value="apple,oranges"> </head> <frameset rows="100%" border="0"> <frame noresize="noresize" src="<?php echo $real_url ?>"> // <===== <noframes> <body>Sorry your browser does not support frames</body> </noframes> </frameset> </html>
  12. file_get_html() ; takes input argument url , it then loads the webpage identified by this url , as document object model and returns it , using find method it searches for hidden elements and return the result as an array of all the hidden elements found in the loaded dom , then you simply treat that as an array to iterate each single dom element (hidden) , the output will be <input type="hidden" name="session" value="4343"/><input type="hidden" name="boi" value="4343fdf"/><input type="hidden" name="dfdf" value="4df343df"/>
  13. simply declare meta tags <html> <head> <title>My site name</title> <meta name="description" value="som discription"> <meta nam="keywords" value="apple,oranges"> </head> <frameset rows="100%" border="0"> <frame noresize="noresize" src="http://some-affilitat.com/?code=45> <noframes> <body>Sorry your browser does not support frames</body> </noframes> </frameset> </html> meta tags will make your page accessable to google , all you need to do is change src attribute of frame tag using php and then throw the output to the client. and the best part you dnt even need to purchase domain if you can implement all this properly .
  14. following sol are possible if you dnt have controle over site http://Product-To-Sell.com/ a) use iframe b)buy new domain and use masked domain forwarding. (name.com gives this option for free)
  15. Here is what I think about Magento (plz correct me if I am wrong ) 1)Each module has its own layout.xml stored in /interface/theme/layouts/ folder. 2)Magento loads all these layouts for current theme and creates a big xml file. Now what I am confused at . a)If magento loads /default/default/ (interface & theme) then why all the templates & layouts are inside base/default/ ?? b)what if I create my module name “page” inside my namespace “Jason” i.e Jason_Page , now what will happen to blocks in layout files which are named <block type="page/html" ....> c)Since all the layouts are loaded and merged into one big xml file , then what happen to all those reference blocks which have same name attribute and are inside “Default” handle tag ? e.g <default><reference name="right"><block name="foo" ..../></reference></default> <default><reference name="right"><block name="boo" ..../></reference></default> d)what is Local.xml layout for and its use ?? e)wats the relation ship between a module name foo , and its layout name foo.xml ? What will happen to layout.xml if two modules with same name exist in diff namespace ? Thanks in advance .
  16. @darbub thanks for info , magento is an beast my zf knowlege is looking small in front of it .no documentation makes it even worse , and yes magento is the most powerfull , extenable ecommerce solution available in market .hopefully my efforts will payoff
  17. Well after geting ZF certified I am looking forward to try applications based upon Zend framework , Is Magento worth going into , and how much does it based on ZF ?? Is there any better open source ecommerce solution avaiable in PHP then magento ? thanks in Advance.
  18. post the full code , from this information , it looks like just a string , since anything in single quote cannot have logic in it .
  19. your lic.php needs to have some part of script funcnality also , for .eg <? function notSoImp(){} function mostImportant(){}; ?> change it to <? function notSoImp(){} include "lic.php"; ? now in lic.php add that removed function i.e mostImportant().
  20. in class two.php r u doing require_once('One.php'); if not then try that first , if that doesnt work do <?php phpinfo(); ?> run the above and check the value of "include_path" .
  21. Well i did $row = $myTb->createRow(); $row->name = 'foo'; $row->email ='some@gmail.com'; $row->save(); The row gets inserted into the database , how can i get the value of last insert primary key id of that row ?? Thanks in Advance.
  22. Suppressing error for functions work @fopen(); but what if I want to supress error for object functions. e.g $myObj->fopen(); how ill i supress it from showing errors ?? In real life i want to supress Strict Standards: Declaration of Form_ImageUpload::setAction() should be compatible with that of Zend_Form::setAction() in G:\Program Files (x86)\Zend\Apache2\htdocs\main\application\Forms\ImageUpload.php on line 3 Which is happening becose I have overided and class function with mine which accepts two parameters instead of one like in parent class. Thanx in Advance as usual.
×
×
  • 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.