Jump to content

3rve

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

3rve's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I created a script using regular expressions to pull info from text files. The script works fine on my test server , but when I upload it to my web host the regex strings do not work the same. Looking at the php info I see that my test server is php 5.04 built --with-pcre-regex=/usr' and the server api is apache 2 handler. Now on the web host it is php 5.05 built --with-mbregex and the server api is CGI. They are both Linux. Test server is apache 2.0.54 / web host is apache 1.3.36. Is there a difference in the way mbregex handles regex vs. pcre? Or maybe it is cgi. Not really sure what is going on, but any help would be greatly appreciated, thanks.... $regx = "Name: [-0-9a-zA-Z''_ ]{4,}"; On my test server this to grab ( Name: 'name' name name ) appostrophes included But on the live server it will only match one of the apostrophes and stop where the second one is
  2. Found the answer to my own question. Thanks to all who looked. header('Content-type: application/xml'); <- insert whatever application type you are trying to send header('Content-Disposition: attachment; filename="download.xml"'); <- filename = whatever you want any content that your script would send to the browser after the header will be sent to the browser as a file to be downloaded.
  3. No not really. Maybe I can clarify what I meant. I have a page where a user submits data into a textarea. I take that input and apply some regular expressions to it so that i can extract certain information. I then want to take the information that I am extracting and create an xml file from that. I have the code already built where php fills in all the blanks between my elements and sends it to the broswers as a regular php/html file. If you view the page source of the php output in the web browser you can see all the xml elements. I just want to take those elements into a file , xml, and when the script is used you are prompted for an xml file download or you are passed a xml file not a php file. I also don't want to create any files on the server, if I wanted to do that I would not be asking for help since that i do know how to do!. Thanks
  4. I am trying to send the contents of a string to the browser as a file, Is there a way to do this without actually creating a file and then sending it back. I don't have any code to share on this , as I have no clue if it is possible, thanks
×
×
  • 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.