Jump to content

stig1

Members
  • Posts

    107
  • Joined

  • Last visited

    Never

Everything posted by stig1

  1. I am access information from a ibm db2 (as400) database system. We have a field that stores dates but they are stored in a varchar (character) field type. When the data (date) come out, they are 'yyyymmdd'. How would I go to format that string into dd-mm-yyyy?
  2. In my terminal screen, I got permission denied for the users nobody and apache when typing in the following: nobody@/var/www/html/trail/$ lpr -o sides=two-sides-long-edge order2.pdf or apache@/var/www/html/trail/$ lpr -o sides=two-sides-long-edge order2.pdf
  3. I installed it via the gui when installing centos 5.4. So it probably is default.
  4. I am alittle confused, do you type that all in the php script? or the terminal screen? cause i run my server as root, no one else has access.
  5. I am trying to build a php page, that will send a shell command to print a pdf. I am using a centos 5.4 with cups installed. I can print fine when I enter the shell command manually into the terminal screen and hit enter, but I would like a user to be able to go to load a page via the browser and it sends the print request. The following is the code I am using does not seem to work: <?php $cmd = 'lpr -o sides=two-side-long-edge order2.pdf'; echo "<pre>".shell_exec($cmd)."</pre>"; ?> Help would be great.
  6. New to using mod_rewrite, but am wondering how this can be stopped, due to, if I can do it, wouldn't search engines be able to do it as well therefore creating duplicate content. I have a product.php?id=300 that I have used to display products on the site. However, on the site, I have built the link structure to display product/300 which equals to product.php?id=300. But i can type in my browser, product.php?id=300 and go directly to that page, how do I stop users typing in the actual page address on the server with the parameters? PS: I also have some sites already indexed in google with the parameters, but need to change them into more user friendly, but when i click on the google link, it does not seem to redirect to the new page with the better urls?
×
×
  • 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.