Results 1 to 8 of 8

Thread: Call external script sending arguments

  1. #1
    Join Date
    Nov 2004
    Posts
    50

    Question Call external script sending arguments

    Hi All,

    About the Smarty templates;
    It's possible to call an external php script from a template and pass some arguments?

    For example.. I need to call from detail_link.html the following:

    <%include file="script.php?url=$url"%>

    but this does not work.. Can you help me on how to do this?

    Thank you for your time on this

  2. #2
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    To call PHP from smarty use <%php> and <%/php>

  3. #3
    Join Date
    Nov 2004
    Posts
    50

    Default

    Hi Bruce

    Ok, but you kown if it's possible to pass parameters to this php script?

    Thanks!

  4. #4
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    It should be, but I don't really know what you want to do. Note that I'm not a programmer, but I can hack up code. Give me an idea of what you're trying to do and perhaps I can tell you if it's possible.

  5. #5
    Join Date
    Nov 2004
    Posts
    50

    Default

    I am trying to call a script like this:

    Code:
    <%php%> include("script.php?url=$siteurl"); <%/php%>
    .. but does not work.. If I remove ?url=$siteurl the script runs, but I need to pass the variable..

    You know other way to pass the variable value?

    Thanks

  6. #6
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    $siteurl isn't a valid variable. Itwould be $site_url

  7. #7
    Join Date
    Nov 2004
    Posts
    50

    Default

    Bruce, no mater what variable I enter as a parameter, It does not pass to script.php ..

    I have been looking at the smarty webpage, but I could not find a way to pass variables with include

  8. #8
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    The smarty FAQ answers your question (I think)

    http://smarty.incutio.com/?page=Smar...AskedQuestions

Similar Threads

  1. Script Dragon - Script Mod Directory
    By mpdaddy in forum Sites in Action
    Replies: 1
    Last Post: 03-06-2008, 10:56 PM
  2. redirecting external links
    By vittle in forum v5.x
    Replies: 3
    Last Post: 11-03-2005, 03:59 AM
  3. 3.2E - new links on external page ?
    By Frank71 in forum v5.x
    Replies: 2
    Last Post: 11-30-2004, 10:27 AM
  4. Not Sending E-mail
    By craven in forum v5.x
    Replies: 9
    Last Post: 09-25-2003, 05:14 AM
  5. External rating for admin links ?
    By Frank71 in forum v5.x
    Replies: 2
    Last Post: 10-14-2002, 02:39 AM

Posting Permissions

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