Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. "public_html" is the document root - users could access "/site1" and "/site2"..?
  2. I don't follow? From what I understand he just has another domain pointing to a sub-directory on his own domain...? Same content just accessed through a different URL.
  3. Oddly 'var' was un-deprecated in 5.3, but only for backwards compatibility. Now though you still have 5 - 5.2, the most widely used versions, where it will generate a deprecated warning. To me it seems a little pointless to change their minds now, but either way you should still use the visibility keywords instead.
  4. I'm sorry but did you write this? All the threads you've started here have just been a long snippet of code with very little information and you've just asked us to fix it for you. If you did write it, please explain exactly what's going on; what are you requesting to update the quantity, what is happening, what errors are you getting, etc. If you can't answer these questions then you need to post this in the freelance section, because we're not here to do it all for you. Apologies if I've got you wrong, happy to help if you'll provide a better description of the problem.
  5. If you have two URLs pointing to the same content, Google will mark you down for duplicate content. It's a black hat type technique for boosting keyword rankings. Also the OP said he didn't want his domain showing in the results, so redirecting any requests would ensure that will never happen.
  6. Can you give us more information and post just the relevant code please? Or if it's all relevant try and give a quick breakdown of what's happening.
  7. Adam

    Wordwrap

    Sans fonts? They are just fonts that don't add "serifs" (the little ticks on letter strokes) like Times New Roman does, for example. Think you meant mono-spaced fonts? I would advise against a JS solution though, simply because you're adding a dependency just to style the page correctly. Good luck anyway.
  8. Adam

    Wordwrap

    <style type="text/css"> div { width: 288px; height: 192px; background: #C9C19C; } h2 { color: #FFFFFF; font-size: 16px; font-family: DejaVuSerifBook; line-height: 2.0em; margin: 0; padding: 10px 30px 10px 10px; } span { background: #EDA305; padding: 0; } </style> <div> <h2> <span>This is an even longer string taking up about three rows</span> </h2> </div> This way works perfect, except that it doesn't have padding on the sides of the text. It's not a huge problem - take a look and see what you think. Don't forget to include your font face rules too: @font-face { font-family: 'DejaVuSerifBook'; src: url('/fonts/dejavuserif-webfont.eot'); src: url('/fonts/dejavuserif-webfont.eot?#iefix') format('embedded-opentype'), url('/fonts/dejavuserif-webfont.woff') format('woff'), url('/fonts/dejavuserif-webfont.ttf') format('truetype'), url('/fonts/dejavuserif-webfont.svg#DejaVuSerifBook') format('svg'); font-weight: normal; font-style: normal; }
  9. Adam

    Wordwrap

    I understand you can split it, but I'm asking why not use CSS? Why does it need to be in multiple spans? I know you seem to want to use PHP but I'm just trying to suggest the best tool for the job here. The problem with using PHP is it has no knowledge of the font size or the element it will be in. Using PHP means you have to try and break the string up into equal parts, but as words and even letters can vary in size it's not easy to achieve consistent results. Supporting another language adds another complication. CSS on the other hand can work out exactly where to split the string and how many rows of text will be needed. Your biggest problem with PHP is deciding how many rows would be needed in order to fit the text evenly, and so how many splits are needed. You can't say x amount of characters or x amount of words can fit into one line, because it varies too much. You can fit far more l's into a line than W's. CSS can do all that though, extremely easy. I'm not trying to be a dick by the way. If there's a good reason for needing to do it this way, I can explain how you'll need to approach it.
  10. Adam

    Wordwrap

    You'll want to play around with the positioning and stuff, but take a look at this: <style type="text/css"> div { width: 140px; padding: 10px; height: 100px; background: red; } span { background: yellow; line-height: 1.4em; } </style> <div> <span>Some random text here</span> </div>
  11. Adam

    Wordwrap

    You can break it per letter/word count, but unless you're using a monospaced font you have no way of knowing how much space a series of characters will take up. Going by letter/word count though you cannot accurately break up a string evenly. Why can't you use CSS - why do you need the text into separate spans?
  12. Adam

    Wordwrap

    This is a job for CSS, not PHP. All you need to do is wrap the content in a block element (DIV for example) and set your desired width.
  13. Adam

    Logs

    That's not a very clear or simple question. What do you mean by 'log of the changes'?
  14. No, PHP doesn't support multiple inheritance. Why do you need to call a child method from a parent? If you explain what you're trying to do I'm sure we can suggest a better way of doing it. Slightly off-topic, but PHP4 mrdhood?
  15. As for the actual file data, you need to quite literally echo the contents into the browser after you've sent the content-type header: echo file_get_contents($filename); Looking at the name of your session varibale ("imgOut"), is application/octet-stream really the right content-type to use here?
  16. This doesn't exactly sound secure. What does this form do?
  17. So long as you never link to the first domain from the second, Google will never know. You could also make sure this never happens by checking for requests to 'domain.dom/othersite' and redirecting to 'othersite.com' at the Apache level.
  18. Not sure if it's the same for you guys in the USA, but during world war 2 the UK laid down copper phone wiring that rivalled few, maybe none. Korea has no or few existing wires, so laying down fresh is far easier than having to dig up and relay an existing system.. That's why some of the most of the powerful countries in the world seem to be lagging behind those that weren't exactly powerful decades ago. At least that's what I've read somewhere sometime.
  19. Just think what things will be like in another 30 odd years.
  20. If you're planning on moving this to a remote network then you'll need connect to your private network and use LDAP to authenticate users accessing the remote network. This shouldn't be a problem on IIS or Apache, but if you have a shared host then it's probably not going to happen without using PHP to perform the authentication.
  21. Windows doesn't just pass your username around to any old site. What are the specs of your remote hosting provider?
  22. Are you using IIS, Apache or something else?
  23. You can use strtotime, as long as your dates contain dashes or dots but not slashes. I still don't trust strtotime() very much though. If you're using PHP >= 5.2 then you can take advantage of the new DateTime object, which has a range of methods that will make things a lot easier for you. Also with 5.3 you have the createFromFormat() method. For example: $date = DateTime::createFromFormat('d-m-Y', $date_str);
  24. You need to use a "print" media stylesheet to hide any elements you don't want printed to paper, and to style how the page should look.
  25. Do you have this somewhere publicly accessible, or a runnable piece of code to illustrate the problem? Can't see anything exactly wrong with it, but it's very difficult to visualise what's happening.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.