Jump to content

TheJoey

Members
  • Posts

    334
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

TheJoey's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  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..
×
×
  • 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.