Search Results

Search found 3 results on 1 pages for 'das123'.

Page 1/1 | 1 

  • Isolate SQL field using regex

    - by Das123
    I'm trying to isolate a specific field in a SQL dump file so I can edit it but I'm not having any luck. The regex I'm using is: ^(?:(?:'[^\r\n']*'|[^,\r\n]*),){6}('[^\r\n']*'|[^,\r\n]*) Which is supposed to grab the seventh field and place it inside reference 1. The trouble is that this is stumbling when ever it finds a comma inside a text field and counts the partial match as the allowable matches. Eg. (1, 'Title', 1, 3, '2006-09-29', 'Commas, the bane of my regex', 'This is the target', 2, 4) matches " the bane of my regex'" instead of "'This is the target'".

    Read the article

  • Apache rewriteBase in .htaccess for development subdomains

    - by Das123
    I think I'm missing something and don't think I really understand how rewriteBase works. The problem I have is that I have a production site where the site is in the root directory yet I have my development site in a localhost subdirectory. Eg http://www.sitename.com/ vs http://localhost/sitename/ If I have for example an images folder I want to reference the images from the site root by using the initial slash in the href. Eg Using a relative href (without the initial slash) is not an option. This will work on the production site but the development site is looking for http://localhost/images/imagename.jpg instead of http://localhost/sitename/images/imagename.jpg So I thought all I needed to do was setup the following in my .htaccess file to force the site root to my subdomain within the development environment: Options +FollowSymLinks RewriteEngine On RewriteBase /sitename But this still uses localhost as the site root instead of localhost/sitename. Can anyone please give me some pointers?

    Read the article

  • PHP Header redirection problem within page called by cURL

    - by Das123
    I have a site that uses cURL to access some pages, stores the returned results in variables, and then uses these variables within its own page. The script works well except where the target cURL page has a header('Location: ...') command inside it. It seems to just ignore this header command. The cURL command is as follows... //Load result page into variable so portions can be allocated to correct variables $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); # URL to post to curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 ); # return into a variable curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $loaded_result = curl_exec( $ch ); # run! curl_close($ch); I've tried changing the CURLOPT_HEADER to 1 but it doesn't do anything. So how can I allow script redirection within the target urls using cURL to grab the results? By the way, the pages work fine if accessed other than via cURL but iFrames are not an option in this instance.

    Read the article

1