Jump to content

mitramcc

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Everything posted by mitramcc

  1. Add some echos to debug that... if(!($con = ssh2_connect("server1.example.com", 22))){ echo "fail: unable to establish connection\n"; } else { // try to authenticate with username root, password secretpassword if(!ssh2_auth_password($con, "root", "secretpassword")) { echo "fail: unable to authenticate\n"; }else{ echo "you are in"; (...) } } and you can also check this link http://kevin.vanzonneveld.net/techblog/article/make_ssh_connections_with_php/
  2. The problem is connecting your DB so you must check if you don't close the connection in the process or something like that...
  3. Hi, the sql looks correct to me, i have tried and it worded for me... and looking to your PHP the problem seems that for instance : you return from your DB: ID 4 Name XXX Subject YYY ID 4 Name XXX1 Subject ZZZ you put that in one array that will overlap the index 4... try to print the instead of saving in one array to validate my theory.
  4. Then u can use the __FILE__ to know where you are and addapt the include... you can also do this with file_exists("path")http://php.net/manual/pt_BR/function.file-exists.php
  5. then if is the battle.php that is calling the function battle and this file is in C:\Software\XAMPP\xampp\htdocs\System_Lords\include you will need to go back one folder to find the file try require('../functions/function_battle.php');
  6. Hy guys, I am having a problem with characters encryption, hopefully somebody can help me... So: I am trying to send an email with SMTP auth and the chars are arriving to my account like this i.e.: 100€ show like 100€ The hole process is like: 1- I select from a database the info I need 2- then I urldecode the data because I urlencoded it earlyer 3- then i use my sendEmail function and "shit happens". I have tried to display the email in the browser and if I dont set the header like this: "<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />" the result is exacly the same as in my email. Also I am putting the header in the email like this: function html($html, $charset = 'utf8', $encoding = 'quoted-printable', $disposition = 'inline'){ . . . $hhtml = 'Content-Type: text/html;'.$this->_crlf."\t".'charset="'.$charset.'"'.$this->_crlf. 'Content-Transfer-Encoding: '.$encoding.$this->_crlf. 'Content-Disposition: '.$disposition; . . . } This is a function from SMTP class.
  7. What is the path from the file that is calling require("/functions/function_battle.php");
  8. Hello, My guess is that you are reading one extra line due one "\n"... to solve that you can try something like adding a following condition if(sizeof($line)<1 (here u can also use the size of the other lines)){ $linearray = explode($fieldseparator,$line); $linemysql = implode("','",$linearray); if($addauto) $query = "insert into $databasetable values('$linemysql');"; else $query = "insert into $databasetable values ('$linemysql');"; $queries .= $query . "\n"; @mysql_query($query); }
×
×
  • 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.