Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. Use ./ rather than / ./ tells PHP to use the current working directory.
  2. OKay looking at your code provided you are using alot of absolute positoning. I would not advise you to use absolute positoning. This probably why your page is not being centered. Get rid of the positioning. Also dont use ImageReady's auto generated HTML code either, have a go at coding the layout yourself.
  3. Something like this: [code=php:0]echo date("h:m:s", time()-3600);[/code] time returns a unix timestamp, so take 3,600 secounds from the timestamp will take 1hour of the current time.
  4. Have a read of [url=http://www.phpfreaks.com/forums/index.php/topic,99116.0.html]this topic[/url] maybe. As its basically the same as what you are doing.
  5. There are very few tutorials on this, but [url=http://www.pixel2life.com/tutorials/All/All/?ba=0&a=7&c=1&f=15&c=1&d=1&ss=install]here is a few[/url]. The best way to grasp how to do this, is to take a part an existing installer script, and see how they do it. Thats how I learnt how to create installer scripts. Also [url=http://www.phpfreaks.com/forums/index.php/topic,100990.msg399220.html#msg399220]this thread[/url] has a basic install script. Creating an install script isn't that hard.
  6. I seen no need to for a HEREDOC statment just to print 1 line of html, but if its mulitple lines 10+ then I'd use heredoc. However if its a 1 liner or 1 or 2 lines I'd use single quotes.
  7. What I was getting at was your method, where you align all the bits you want left and what bits your want to be aligned right. You dont hav to do that. You can wrap everthing up in a container div and do this: [code]#container{ margin-left: auto; margin-right: auto; width: 800px; }[/code] which wont effect how your text/elements align, but only the container div.
  8. The @ symbol supresses error messages. For example if $amount didn't exist you might get this error: [b]Notice: Undefined variable: amount in [path to script] on line [line number here][/b] When you use the @ symbol infront of the $amount variable, the error message will not be shown.
  9. When you are including files, make sure you the file you are including actually exists on your server, and use your servers document root when including files, espcially when doing somthing like this: [code=php:0]$page = $_GET['page'] include $_GET['page']. '.php';[/code] So rather than doing the above do this: [code=php:0]$page = $_GET['page']; // check that the files exists first if(file_exists('http://www.site.com/' . $page . '.php')) {   // if it does include it   include $_SERVER['DOCUMENT_ROOT'] . $page . '.php'; } // file doesnt exists, hakcing attempt! else {     die('<h1>hacking attempt</h1>'); }[/code] That isnt the best way of doing it, but is just a quick example.
  10. With the code: [code]$row_f->f_matt = nl2br(preg_replace("<br />","",$row_f->f_matt));[/code] your are removing the br tags (with preg_replace), then your are putting them back in again (with nl2br)! Seems pointless to me.
  11. Change: [code]fputs($file_write, $name, "$input_file[0]"); // input the info from form[/code] to: [code]fputs($file_write, $name); // input the info from form[/code]
  12. DO something like this when you are getting the news [code]echo '<a href="news-page.php?id=' . $newsID . '">' . $newsTITLE . '</a>'; // rest of PHP code here.[/code]
  13. PHP doesnt interfere with anythink as long as you setup the webserver up correct to parse php files with the PHP inteprerter.
  14. What does this produce: [code]<?php echo '<pre>' . print_r(get_loaded_extensions(), true) . '</pre>'; ?>[/code] Is mssql or msql listed in the result from that code. If it is, then is a strange!
  15. makeshift_theory thats not a good way to go about it at all.
  16. Apache2.2.x doesnt support any SSL currently. Here is a quote: [quote=http://apache.rmplc.co.uk/httpd/binaries/win32/]Apache 2.2.2 offers tremendous improvements in authentication, proxy, and cache features. The Apache HTTP Project encourages all Apache users to migrate to the 2.2 series. The -win32-x86-no_ssl.msi package does not include any encryption software OpenSSL, mod_ssl, nor an https: enabled abs utility. At this time, the process to follow for export notification has not been finalized. Until that time, the -win32-x86-ssl.msi with mod_ssl support based on OpenSSL is not available. Please do not inquire of the httpd project, this issue is not in our hands to address for you. If you want to build OpenSSL 0.9.8a it is available in source code form at http://www.openssl.org/source/openssl-0.9.8a.tar.gz. Due to quirks in the build, and the need to create .pdb diagnostic files, we offer this patch, patches_applied/openssl-0.9.8a-vc32-2005.patch to modify that build, and have proposed this patch back to the project for its consideration.[/quote] This was taken from [url=http://apache.rmplc.co.uk/httpd/binaries/win32/]here[/url], from the heading [b]The current stable release is Apache 2.2.2[/b] If you want to use SSL, then you'll either have to wait until Apache supports SSL, build openSSL from source, or downgrade to Apache2.0.x
  17. In order for your page to align to the middle you will need to use a valid [url=http://www.w3schools.com/tags/tag_doctype.asp]DOCTYPE[/url] (which you dont have). And you need to give your container div a width. Otherwiser the browser wont be able to calculate the auto margins to center the page in the browser.
  18. Its the same with php: include '../dir_name/filename.php'; ../ = up one higher directory ./  = use the current working directory
  19. serialize it: $errors = serialize($errors); then when you retrieve the errors unserialize, them: $errors = unserialize($_GET['errors']); However Id suggest you use a cookie/sessions instead rather then sending the errors through the url.
  20. Yeah when you use mysql connect you use the same username/password combo you use when you login to mysql through the  command line. Glad you got everything sorted out.
  21. You'll want to use the OLD_PASSWORD directive when setting your password for mysql. Which OS are you running, unix based or windows? I think you'll better or upgrading PHP to PHP4.4.2
  22. or you can use ini_set i believe: [code]ini_set('session.gc_maxlifetime', 1200);[/code]
  23. Oh I see what you mean now. This happens when you haven't closed your your quoters properly
  24. trim only removes spaces from the start and end of a string. it will not remove spaces between characters. If you want to remove the spaces use str_replace
  25. I have change it to 'xxx'
×
×
  • 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.