SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Nov 2011
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IDE that lets you see PHP includes and edit them (as if they were not includes)

    Hoping that something exists that can let a person view the includes files in a php script as if they were not included but copy-pasted in their respective locations in a script.

    example:

    main script:
    <?php

    echo "hey is my includes: ";
    include_once myincludedfile.php;

    ?>

    myincludedfile.php
    <?php

    echo "an included file";

    ?>

    So the ide would integrate them automatically to yield:

    <?php

    echo "hey is my includes: ";
    echo "an included file";

    ?>

    Dreamweaver's live view does this but the code is read only. Any non-read only alternatives?

  2. #2
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,883
    Mentioned
    74 Post(s)
    Tagged
    6 Thread(s)
    Try this to view the included contents:
    PHP Code:

    <?php 
       $filename 
    'myincludedfile.php';

       echo 
    "hey is my includes: " .$filename;
       
    highlight_file$filename );
       include_once 
    $filename;

      
    # you could also try this 
      # echo file_get_contents( $filename ); 

    ?>
    I do not understand about editing an online file?
    Last edited by John_Betong; Mar 21, 2012 at 21:15. Reason: added: file_get_contents(...);
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Wolfshade on earning Member of the Month for August 2014

  3. #3
    SitePoint Addict
    Join Date
    Nov 2011
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What I am hoping for is some software solution that would allow me to work on a php file with a lot of includes, which automatically "includes" the files into my code so I can work on it as if it were one giant PHP file. So as if I had just went to the included file and then copy pasted the file into the appropriate location in my script. So this isn't a question about making includes work once they are processed by the server and given to the browser, but about how the includes are presented in my code editor.


Bookmarks

Posting Permissions

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