Jump to content

TheJoey

Members
  • Posts

    334
  • Joined

  • Last visited

    Never

Everything posted by TheJoey

  1. <IfModule mod_headers.c> SetEnvif Client value Get-Duration Header add Duration "%D" env=Get-Duration </IfModule> Do you spot anything wrong with that code? it works with some files but not others im getting this output Escape character is '^]'. Get /tests/10KB HTTP/1.1 Client: Get-Duration HOST: localhost HTTP/1.1 501 Method Not Implemented Date: Fri, 28 May 2010 02:55:08 GMT Server: Apache/2.0.58 (Unix) PHP/5.1.4 Allow: GET,HEAD,POST,OPTIONS,TRACE Content-Length: 309 Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>501 Method Not Implemented</title> </head><body> <h1>Method Not Implemented</h1> <p>Get to /tests/10KB not supported.<br /> </p> <hr>
  2. looks like you need a foreach loop for the echo of your results
  3. so array($tick[]=tock) instead the push?
  4. im sorry could u explain that a little more? or mabye use the tick tock example i have :)thanks
  5. hey there php freaks i have a code snippet and it using array_push and i was just curious to find out if there is an another way to use an array the same way but without array_push thanks $super = array(); $supersuper = array(); array_push($tick,tock);
  6. <?php $xmlDom = new DOMDocument(); $xmlDom->load("searchcontents.xml"); $xmldom->validateOnParse = true; $variable =$argv[1]; $results =$xmlDom->getElementsByTagname($variable); if $findresult = $variable { foreach ($findresults as $result) { // childNodes holds the result values $text_nodes = $result->childNodes; foreach ($text_nodes as $text) { print $text->nodeValue . "\n"; } } } print $xmlDom->saveXML(); ?> ive changed my code to this but still cant get it to display all results that match <books> <book> <author>Jack Herrington</author> <title>PHP Hacks</title> <publisher>O'Reilly</publisher> </book> <book> <author>Jack Herrington</author> <title>PHP </title> <publisher>booky</publisher> </book> </books> so if i try to search "jack" it will display all results with jack in it
  7. <?php $xmlDoc = new DOMDocument(); $xmlDoc->load("abc.xml"); echo '<form method="get"> search: <input type="text" name="search" /><br /> <input type="submit" value="Submit" /> </form>'; // We need to validate our document before refering to the id $xmldoc->validateOnParse = true; function $id { } $xmldoc->getElementByName('$id')->tagName . "\n"; print $xmlDoc->saveXML(); ?> just now sure how to right a function that would search the xml file which contains. <books> <book> <author>Jack Herrington</author> <title>PHP Hacks</title> <publisher>O'Reilly</publisher> </book> </books>
  8. Ok, my mistake there is a user field, how do i make it so that the userfield becomes the search string, do i need a function write?
  9. No i want to right the function for $id, if thats possible? where it will take the "search string" from the user php parse
  10. <?php $xmlDoc = new DOMDocument(); $xmlDoc->load("abc.xml"); // We need to validate our document before refering to the id $xmldoc->validateOnParse = true; function $id { } $xmldoc->getElementById('$id')->tagName . "\n"; print $xmlDoc->saveXML(); ?> <books> <book> <author>Jack Herrington</author> <title>PHP Hacks</title> <publisher>O'Reilly</publisher> </book> </books> im new to this sort of this but what im trying to do is make $id user inputted so if they wanted title it would file title from this file, im not sure how to go about writing a function for that
  11. <FilesMatch "\.(html|php)$"> Order Allow,Deny Deny from all </FilesMatch> i have this but its blocking the files that i want to be accepted
  12. i have two xpath functions but the second one seems to copy every matching word and creates to many duplicates <xsl:for-each select="xmlroot/xmldirectory/find[not(.=following::find)]/.."> <xsl:variable name="var1" select="find" /> <xsl:for-each select="//wordEntry/find[./text()=$var1]/../results"> <xsl:value-of select="."/> </xsl:for-each>
  13. concat is a nice little trick thank you so much!
  14. <head> <xsl:variable name="var1" select="var1"/> <xsl:variable name="var2" select="var2"/> <title><xsl:value-of select="$var1,$var2" /></title> </head> it only seems to show var1 .. also if it would be possible to display vars we have are "var1" "var2"
  15. <VirtualHost *:88> ServerName www.blahblah.com DirectoryIndex index.html <FilesMatch ".(html/php)"> Order Allow,Deny Allow from all </FilesMatch> </VirtualHost> i dont think this is right..
  16. How do i enable my server to accept only certain file types, like .txt and .html only. also i wasnt sure were to post this but how would i go about creating a PKE
  17. TheJoey

    XML DTD Issues

    thank you for your help
  18. TheJoey

    XML DTD Issues

    That would make it so <option sex="male" /> right?
  19. TheJoey

    XML DTD Issues

    Is there a way to restrict the data that goes "inside" those <option> </option> <option> This here </option> "this here being the data we want to restrict for example to male or female"
  20. TheJoey

    XML DTD Issues

    i only want it to parse. if ethier option1 option2 option3 is selected or it will give me a error saying must be option1 - 3 etc is that possible with dtd?
  21. TheJoey

    XML DTD Issues

    What does that acutally do? ive tried alot of things, it parses fine, although i want it to only accept the values option1-3 <!DOCTYPE root SYSTEM "root.dtd"> <root> <option> dsfsdf </option> </root> root.dtd <!ELEMENT root (option)> <!ELEMENT option (#PCDATA)> <!ATTLIST option option (option1|option2) "option1" >
  22. TheJoey

    XML DTD Issues

    Couldnt find a forum for it to suit, and considering that php is loading my xml thought it would be ok.
  23. TheJoey

    XML DTD Issues

    Im having problems getting my dtd to work i want the user to have a option like <!ELEMENT option (choose) <!ELEMENT choose (one|two|three) > But it doesnt seem to like it because my whole dtd works without that line. im completely stuck! Thanks in advance for any help i can get
  24. is there a simpliar way to do that i find that very hard to understand
  25. session.referer_check no value no value what should i be looking for?
×
×
  • 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.