1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

include text file with ENTER

Discussion in 'C#' started by roice, Dec 5, 2010.

  1. #1
    Hello
    I did INCLUDE to TXT file that hold few varibles
    my include:
    <!-- #include file="texts/file.txt" -->
    PHP:
    file.txt goes like that:
    <%
    
    title = this is the title of the page"
    
    des  =  "Here goes the descrition of the page
    
    right here all you need
    
    <h2>Sub title of the page</h2>"
    %>
    PHP:
    As you can see var "des" include break between the lines, thing that create error in my system:
    Microsoft VBScript compilation  error '800a0409'
    
    Unterminated string constant
    
    /texts/file.txt, line 17
    
    des =  "Here goes the descrition of the page
    PHP:
    How can I fix that without writting all the text in 1 line?

    Thanks in advance
     
    roice, Dec 5, 2010 IP
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Why do you want the line breaks?
     
    AstarothSolutions, Dec 5, 2010 IP
  3. roice

    roice Peon

    Messages:
    200
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Because I do text copy to the variable. I take full paragraph and copy it to the des = " "
     
    roice, Dec 5, 2010 IP
  4. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Ok, if its just for convenience of copy and pasting the short answer is that you can't do it.

    There are plenty of online tools that you can use to remove the line breaks to make your copy/pasting easier. Alternatively you can easily write some VB to do it for you assuming you have the text in TXT files (rather than Word)
     
    AstarothSolutions, Dec 6, 2010 IP