Jump to content

TCH-Don

Members
  • Posts

    11,643
  • Joined

  • Last visited

Everything posted by TCH-Don

  1. 172 Aw, adorable, who is it :hug:
  2. Wahoo
  3. You are welcome. And if you find a great way to use heredoc, let us know, we all can learn from each other. that is what family is for.
  4. Highlander
  5. Recently someone asked what is heredoc? In my opinion it is an often overlooked feature of php. What is it you ask, well the short answer is, its a string wrapper. Its grouped with the single and double qoute. php functions like echo need to have stings wrapped in quotes, like echo("some text to be displayed on the screen"); As you try to display more complex strings containing other qoutes, you have to escape the double quotes that are part of the string by placing a \ in front of each " inside the first and last quotes. Anything between single quotes will be displayed as is, meaning that php variables will be displayed as the name and not the contents. So if you are going to use echo to output a link with a php variable in it, it will not work by wrapping in single quotes. You need to use double quotes and escape all internal double quotes. An easier way is to use the heredoc wrapper <<< Like the html tag PRE, heredoc preserves line formatting including spaces. this makes it quick and easy to define large amounts of text, html and php variables. The syntax is all on a single line function space <<< space and the delimiter of your choice and then new line with your text, html and variables using as many lines as you need followed by a new line with the delimiter and looks like this ><?php echo <<< EOD some text to display including leading spaces and blank lines and "you" can mix quotes as needed. EOD; ?> The <<< is followed by your own delimiter, I used a common one EOD to indicate End Of Data, but it can be what ever you wish. And note that the ending delimiter must be on a line by itself with no spaces on that line. You can follow it with a ; So an example with a litte style extras would look like this ><?php echo <<< EOD <style type="text/css"> <!-- font-size: large; text-align: center; color: blue; --> </style> Hello $visitorname, thanks for visiting. I will get back to you at $visitor email Please visit our <a href="http://domain.com">site again soon.</a> EOD; ?> See how much easier that is to read and create. And you do not have to jump in and out of php to display variables. Another example: assign a table with the contents of php variables from a user submitted form to a variable ><?php $thank_you_message= <<< HEREDOC <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td> Thank you $visitorname for contacting me. </td> <td> I will get back to you at $visitoremail as soon as possible. </td> <td> Please feel free to visit my other site <a href="http://myothersite">visit my other site</a> any time. </td> </tr> </table> HEREDOC; ?> remember no spaces on the last line with the delimiter. Yes you could jump out of php for the most part and jump back in to php to display variables, but thats a lot of trouble. With heredoc you can freely mix text, html and php variables without worring about escaping quotes. And you can use leading spaces and blank lines. In fact most forums make heavy use of heredoc for templates. So give it a try.
  6. Are you sure the height attribute applys to <textarea> ?
  7. Finally someone I can vote for
  8. I have the /CATALOG/ folder because I clicked on a shopping cart in cpanel just to look at. But thats only in one domain, none of the others. Same goes for the /public_html/entropybanner/ I played with it on one domain, but it not on the others. I just deleted the catalog folder using file manager, after copying it, and no problems.
  9. Is it just one person that gets their e-mail bounced.? Do you have the default e-mail set to bounce? I was thinking if you did, maybe they miss spelled the addy, I know not likely. Is anyone else reporting this problem to you?
  10. LOL cute! too bad you can't leave it in one of the moods.
  11. No sorry I was just kidding I don't like to fill in my data for free stuff ether. I can use media player 9 to listen to radio on my computer for free now.
  12. While the help desk can't help with the install, they can make sure Image Magick is working.
  13. You are welcome, and don't be a stranger
  14. Hi Elena, You need to be using ns1.totalchoicehosting.com - 64.246.50.105 ns2.totalchoicehosting.com - 65.254.32.122 for your name servers. It may take a while for the change to be updated by all the ISP name servers. There was an e-mail a while back about this, I had to change mine too.
  15. Thats ok I filled it out for you
  16. I have sent you another PM, we will get this working!
  17. Welcome to the Family Farah and your new home! It depends on their ISP too. My neighbor has AOL, and it takes anywhere from 2 hours to 14 hours to get an e-mail from next door We really are like family here. So if you need anything, just ask your new family! We love to help
  18. Hi Mike, /usr/local/bin/ is the path to all Image Magick files I have not installed Coppermine, but I am sure others here may have run into this and will be along.
  19. Boo
  20. Last I checked his site was gone. If you mean Eric.
  21. Yes the Config.pm file is capitalized.
  22. Bath
  23. When search engines crawl your site, they look for robots.txt to tell them what they can index and what not to index. When they do not find it, you see the 404 (missing) error. You can put a blank text filenamed robots.txt in your public_html folder to eliminate these errors. Or you can create a robot file by using a Robots.txt file generator.
  24. Yes, what you are doing is to download to your computer compressed files that are the backup. (homebackup, databases, e-mail filters and alias.) Then if needed you can upload back from your computer to cpanel > backup nothing to install. I keep a folder named cpanel backups for each domain and keep them in there. And copy to second drive, but if you want you can copy the files to a CD.
  25. Just download the home backup and everything below, databases, e-mail filters and alias. The homebackup has all your files and e-mail. Then if you need to you can upload the homebackup and the rest to restore your site. I do this often. The contents of our sites and backups are our responsibility. And this makes it easy.
×
×
  • Create New...