SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2005
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    deamweaver include problem

    I trying to get up to speed in dreamweaver in hopes of speeding up my development time on sites.

    My latest obstacle is trying to get an include to work.

    Code:
    <?php require("../includes/functions.php"); ?>
    This produces a bunch of garbage text on the page.

    Any thoughts?

    Thanks

    Matt

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    what does the garbage text look like?

  3. #3
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mkdrums View Post
    I trying to get up to speed in dreamweaver in hopes of speeding up my development time on sites.
    My latest obstacle is trying to get an include to work.
    Code:
    <?php require("../includes/functions.php"); ?>
    This produces a bunch of garbage text on the page.
    Any thoughts?
    Thanks
    Matt
    What do you mean by garbage text? Where did you see the garbage texts when you require the file? And what is the problem in dreamweaver and nothing with others?
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  4. #4
    SitePoint Zealot
    Join Date
    Aug 2005
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    ��<�?�p�h�p� � � �f�u�n�c�t�i�o�n� etc....
    the file I am including is a bunch of date functions that I copied directly over from another project so i know that is not the problem.

    It seems to me that it just wants to include it as actual text and not php.

    when I include a file that has this as the contents:

    Code:
    hello
    it prints out "hello" to the screen with no problem.

    thanks

    Matt

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2007
    Location
    Virginia
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try saving the document in notepad and reuploading, looks like it's saved with character encoding. I've had problems like this with (i think) utf-8 bytes. Wish I new more about the subject, but I wound up upgrading that portion of the program to resolve the issue.
    Mark A. Drake
    - Mark A. Drake
    - OnSlaught

  6. #6
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is that file (your included file) encoded somehow? That may be the cause but i am not sure.But i am sure there is a problem in your included file because when you include some other normal file then it worked for you.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  7. #7
    SitePoint Zealot
    Join Date
    Aug 2005
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow! you guys are brilliant!

    I opened it in notepad and saved it as ANSI (no idea what that means) and it worked and I can call the functions.

    I don't see that my normal editor (not DW) has character encoding so I guess I will have to add a step whenever I am going from hand coding to importing into Dreamweaver.

    Thanks again guys

    Matt


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
  •