How can I insert script

Discussion in 'HTML & Website Design' started by nicesurf, Feb 13, 2009.

  1. #1
    hi,

    I don't have any ideas how to edit my website and now I have a problem. I want to insert a script into my website (between <body>) but I could not find the file where I can find the it in Cpanel - File Manager.

    I use hostgator as my webhosting and I see most of the files are in php extension.

    Could somebody tell me how I can add / insert script between <body> ?
     
    nicesurf, Feb 13, 2009 IP
  2. mytor

    mytor Peon

    Messages:
    80
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you don't have any experience editing your php and html files I strongly suggest you let someone else do it for you. But on the other hand it is never too learn it yourself, so I suggest you download free ftp client like "filezilla" and access your files via it. If you manage to download the file you need to edit, just open it in notepad or any other text editor and paste your code where you want, save it and upload it back to server. I recomment making a backup of the file you are editing :)
     
    mytor, Feb 13, 2009 IP
  3. revoD

    revoD Peon

    Messages:
    120
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Inside cpanel go to file manager, navigate to the file you want to edit, click on edit file on the right column, insert the script where you want to in between the body tag and click on the save button.
     
    revoD, Feb 13, 2009 IP
  4. nicesurf

    nicesurf Active Member

    Messages:
    712
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #4
    Yes..I know that I have to go to File Manager but what is the name of the file where I can find :

    <body>

    I will insert a script here.

    </body>
     
    nicesurf, Feb 14, 2009 IP
  5. ExtremeData

    ExtremeData Well-Known Member

    Messages:
    450
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    125
    #5
    What script/cms do you use ?
    If you want make a new ftp user and PM me with the ftp details and I'll try to help you.
     
    ExtremeData, Feb 14, 2009 IP
  6. nicesurf

    nicesurf Active Member

    Messages:
    712
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #6
    Is it in default in default.html ? I have three websites hosted in the same account. And I found only one default.html file. If I insert a script in it. does it affect other website ?
     
    nicesurf, Feb 14, 2009 IP
  7. ExtremeData

    ExtremeData Well-Known Member

    Messages:
    450
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    125
    #7
    I don't know..
    The default.html or index.html may be the homepage of one website.
    If you have multiple websites into same account that's must be on subfolders like yourwebsite, yourwebsite2.
    That's subfolders are created automatically by cpanel when you add a new website to your account.
    We can't help you if you not give us more details.Take a screenshot of file manager(in cPanel) and post here.
     
    ExtremeData, Feb 14, 2009 IP
  8. nicesurf

    nicesurf Active Member

    Messages:
    712
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #8
    I can not put screenshot here because there are so many files and directories but most of the files in php except image ( gif).
     
    nicesurf, Feb 14, 2009 IP
  9. ExtremeData

    ExtremeData Well-Known Member

    Messages:
    450
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    125
    #9
    I can't help you if you don't let me to help you.
     
    ExtremeData, Feb 14, 2009 IP
  10. TorinoC

    TorinoC Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Well let me ask you this. How did you start you website? I mean after you signed up for your webhosting account did you upload the files to your hosting server or did someone else do it for you, or did you install a CMS script such as Wordpress, Joomla, Drupal, etc?

    In order for anyone here to help you we need to know if you are using a CMS or not.

    Or maybe you can give us the URL to your site.....We need more detail in order to help you.
     
    TorinoC, Feb 14, 2009 IP
  11. oldball

    oldball Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    look through the files for the file which is your "template". look in each file for the <body> tag and then you'll know that this is your template file. it will also have the <html> tag and maybe some <meta> tags. just look through each file and see which is the template.
     
    oldball, Mar 14, 2009 IP