Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2003
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question parsing PHP in iframes

    hi, buddies!!!

    hope it's possible to force php machine to parse files contained on frmes.
    such construction just displays source code instead of proccessed one:
    ...
    <TR>
    <TD bgcolor="black" valign="bottom"><!-- frames -->
    <IFRAME name="xxx" src="c:/AppServ/www/mine/03/cutenews/show_news.php" marginwidth="1" marginheight="1" scrolling="yes" frameborder="0" height="470" width="550"></IFRAME>
    </TD>
    </TR>
    ...

    shown output:

    <?PHP
    error_reporting (E_ALL ^ E_NOTICE);
    $path = __FILE__;
    $path = preg_replace( "'\\\show_news\.php'", "", $path);
    $path = preg_replace( "'/show_news\.php'", "", $path);
    require_once("$path/inc/functions.inc.php");
    require_once("$path/inc/templates.php");
    require_once("$path/inc/config.php");
    ...

    TNX!!!
    PEACE!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In your src attribute of the iframe, the link points to a file path on a windows machine. This path must be served by, uh, your server instead. Try changing it to localhost/dir/whatever.php and see if it works then.
    De gustibus non est disputandum.


  •  

    Posting Permissions

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