Results 1 to 3 of 3
  1. #1
    Join Date
    March 4th, 2006
    php virtual .. extra code inserted?
    I have it set up to use a php virtual on my other sites to link back to my store and also provide true links and content but I am getting extra code being shown on my page. The words...


    "); document.close();

    Appear on either side of the amazon results that are displayed?

    The code I am using is...

    print file_get_contents(",r:2");

    Any ideas?

  2. #2
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Toronto, Canada
    Don't use the "ssi" and "script" parameters at the same time. Use just the "ssi" parameter since you're using this URL in a PHP call (equivalent to an SSI call). Get rid of the "script" parameter since you're not using this URL in a <script> tag. The "script" parameter has higher precedence than the the "ssi" parameter so the results are being formatting for use in a <script> tag so that's why you're seeing the JavaScript document.write/.close statements.

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  3. #3
    Join Date
    March 4th, 2006
    PERFECT! Works like a charm.

    I changed the code to..

    print file_get_contents(",r:2");

    and then I added...

    AddType application/x-httpd-php htm html

    to my .htaccess file to keep my html file extension.

    Thanks for the help.

  4. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. php code
    By tvcrazyman in forum GoldenCAN
    Replies: 4
    Last Post: January 19th, 2006, 05:22 PM
  2. -- PHP Virtual problem
    By rardentech in forum Scripts
    Replies: 5
    Last Post: June 28th, 2003, 05:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts