Announcement

Collapse
No announcement yet.

General PHP Help needed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gellpak
    replied
    no, usually there is no impediment to including pretty much endlessly like that, just dont put it in a loop, like having one file include a second file that includes the first file, it causes crashes....

    Leave a comment:


  • Chexbox
    replied
    Re: General PHP Help needed

    Originally posted by Omega
    Hi,

    ...
    Now to include it in my PHP page I used

    PHP Code:
    include("news/news.txt"); 
    this works great !

    But now I wanted to include the newsscript itself in a part of my page. So I thought:
    PHP Code:
    include("news/nphpd.php"); 
    But nphpd.php also includes fiels that are in the news dir.
    so I get an error
    ....
    So does that mean that you can't include files that have includes within them?
    (I am also a newbie)

    Leave a comment:


  • Gellpak
    replied
    look in the file and find the output, then change it to a variable that your script echoes? depends on how you're running your script...

    Leave a comment:


  • Conscience
    replied
    nphpd is not designed to be included. therefore there would be some sort of error in doing it...ie something that its calling is conflicting - could be many reasons

    Leave a comment:


  • Mega
    replied
    Got 1 more...


    if I use:
    PHP Code:
    include('news.php'); 
    it works great..
    but with:
    PHP Code:
    include('news.php?page=archive'); 
    I keep getting error

    Leave a comment:


  • orca
    replied
    Hmm, a bit editing of the newsscript is may needed. Just change the path to the included files in the newsscript.

    Leave a comment:


  • Omega
    started a topic General PHP Help needed

    General PHP Help needed

    Hi,

    I'm a n00b to PHP, but I'm doing the best I can to learn it.

    My problem.

    I downloaded a newsscript what generates a textfile with the news in it.

    Now to include it in my PHP page I used

    PHP Code:
    include("news/news.txt"); 
    this works great !

    But now I wanted to include the newsscript itself in a part of my page. So I thought:
    PHP Code:
    include("news/nphpd.php"); 
    But nphpd.php also includes fiels that are in the news dir.
    so I get an error.

    Is there a way to fix this without editing the newsscript?
    sortof a changedir?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X