Jump to content

csplrj

Members
  • Posts

    54
  • Joined

  • Last visited

Everything posted by csplrj

  1. json_decode returns a stdClass Object. Is there any way where I can get instance of my class instead of the same? I mean If I json_decode the below string then it will provide me instance of stdClass and not instance of Person class {"name":"a"} How to achieve the same? Thanks in advance CSJakharia
  2. I had downloaded facebook PHP SDK and show this issue. I know this issue as it happened even in my one of the PHP project and so want to solve this. I think this has to do something with php.ini setting but don't know what Thanks in advance CSJakharia
  3. When I use require('../config.php'); It does not works on my machine but it works on shared hosting Can someone help me what must be the issue? Thanks in advance CSJakharia
  4. I am using some jquery plugin http://jquery.malsup.com/form/ and its not working for that. I will require changing the code for the same and so was asking CSJakharia
  5. is there any way to POST array without brackets in name attribute? i.e. instead of "product[]" have "product" in the <input name="<NAME>"> Thanks in advance CSJakharia
  6. I guess pls set the name from name='emp_list' to name='emp_list[]' CSJakharia
  7. How to set innerHTML of DomNode? I am parsing html.I want to change a html of DomNode/DomElement? How to achieve the same? Thanks in advance CSJakharia
  8. I have parsed a HTML file using DOMDocument.Now I want to wrap the Node with <span> tag so that instead of "<input type=textbox>" it will be "<span><input type=textbox></span>" Thanks in advance CSJakharia
  9. Any type of framework is available which enables the online/offline model just like Google gears? http://gears.google.com/ Google gears enable the synchronization but it does not stores in mySQL and so seeing for some framework which enables the same Thanks in advance CSJakharia
  10. I know that but it requires java Installed on the server. Any other apart from this.
  11. does anyone knows of Open Source/Free Reporting Framework/Tool Thanks in advance CSJakharia
  12. Does anyone knows of any library or utility which can give me the same functionality as http://commons.apache.org/beanutils/apidocs/org/apache/commons/beanutils/package-summary.html#package_description gives in Java. A way by which I can access nested property of the Class I found one but it supports simple property only not nested property http://www.zend.com//code/codex.php?ozid=1481&single=1 Thanks in advance CSJakharia
  13. The date I receive is in dd/mm/yyyy format. I want to convert it into yyyy-mm-dd format How to format a date which i get from user in $_POST['transdate'] as 14/01/1970 to 1970-01-14 format? Thanks in advance CSJakharia
  14. I got the issue was I have to use instead of $pages1=json_decode($pages); I have to write $pages1=json_decode(stripslashes($pages)); in the Shared hosting Thanks in advance CSJakharia
  15. Thanks for the link given as it helped me in identifying the issue I changed the json string and then When I try it does not works in PHP Version 5.2.4 but it works on PHP Version 5.3.1. I have my shared hosting on PHP Version 5.2.4. How to do the same <? $pages=$_POST['pages']; if($pages!=null) { $pages1=json_decode($pages); var_dump($pages1); } ?> <form method="post" id="addPage"> <input type="hidden" value='[{"parentPageId":0, "id":0},{"parentPageId":0, "id":68},{"parentPageId":0, "id":69},{"parentPageId":69, "id":70},{"parentPageId":0, "id":71}]' id="pages" name="pages"/> <input type=submit> </form> Thanks in advance CSJakharia
  16. Below is the output for $pages [{"id":0},{"id":64, "websiteId":14, "pageName":"Home", "parentPageId":0, "pageTypeId":1, "orderNo":1, "pages":[]},{"id":65, "websiteId":14, "pageName":"a", "parentPageId":0, "pageTypeId":1, "orderNo":2, "pages":[{"id":66, "websiteId":14, "pageName":"b", "parentPageId":65, "pageTypeId":1, "orderNo":3, "pages":[]]},{"id":66, "websiteId":14, "pageName":"b", "parentPageId":65, "pageTypeId":1, "orderNo":3, "pages":[]},{"id":67, "websiteId":14, "pageName":"c", "parentPageId":0, "pageTypeId":1, "orderNo":4, "pages":[]}]
  17. Below is the code I have written for php json decoding. Can't understand the reason Thanks in advance CSJakharia PHP File <? $pages=$_POST['pages']; if($pages!=null) { $pages1=json_decode($pages); //echo((json_encode(array('a'=>1,'b'=>2)))); echo($pages); var_dump($pages1); echo PHP_EOL; //echo($pages1); echo(' JSONERROR='.json_last_error()); } ?> <form method="post" id="addPage"> <input type="hidden" value='[{"id":0},{"id":64, "websiteId":14, "pageName":"Home", "parentPageId":0, "pageTypeId":1, "orderNo":1, "pages":[]},{"id":65, "websiteId":14, "pageName":"a", "parentPageId":0, "pageTypeId":1, "orderNo":2, "pages":[{"id":66, "websiteId":14, "pageName":"b", "parentPageId":65, "pageTypeId":1, "orderNo":3, "pages":[]]},{"id":66, "websiteId":14, "pageName":"b", "parentPageId":65, "pageTypeId":1, "orderNo":3, "pages":[]},{"id":67, "websiteId":14, "pageName":"c", "parentPageId":0, "pageTypeId":1, "orderNo":4, "pages":[]}]' id="pages" name="pages"/> <input type="hidden" value='[{"id":0},{"id":64, "websiteId":14, "pageName":"Home", "parentPageId":0, "pageTypeId":1, "orderNo":1, "pages":[]}]' id="pages" name="pages1"/> <input type=submit> </form> But this output comes NULL JSONERROR=2
  18. I want to call $addRecord->Documents[0]->name = 'a' but as "Documents" and "name" come from runtime I tried $addRecord->$docs[$i++]->$name = 'a' But it calls instead $addRecord->D->name = 'a' I want to call $addRecord->Documents[0]->name = 'a'. But instead it calls $addRecord->D->name = 'a'? How to achieve the same Thanks in advance CSJakharia
  19. Thanks that will solve my problem. Actually i was so used to array_push that i thought i have to use some sort of function and so asked Thanks CSJakharia
  20. I want to add a key,value pair to array. I know array_push but it adds only value how to add value alongwith key associated with the same? Something of this sort array_push($array,$key=>$value); Thanks in advance CSJakharia
  21. It parses the html content of a website and gets the data from the html which is required to me
  22. I have a long running script which may go on for long time may be 4 to 5 hours? How to get running the same in a shared hosting environment? As I tried the same but it seems it does not works in a shared hosting environment? I tried set_time_limit(0); ignore_user_abort(); but it does not seems to works Thanks in advance CSJakharia
  23. Does PHP Supports XPath 2.0? If Yes then from which version? If No then is there any other library which can provide the xpath implementation? Thanks in advance CSJakharia
  24. I have a HTML document in which there is a <td> tag In this td tag the TextContent is equal to "Type" It is not neccessary that the td tag directly has content,it may have content in the subtags. The "Type" stuff may be enclosed in between the spaces What will be the XPath expression for the same. i am trying this using DomXpath of pHP? <td align="left" style="background-color:#648190;"><span style="color:#ffffff;font-family:arial;font-size:small;"><b> Type</b></span></td> Thanks in advance CSJakharia
×
×
  • 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.