Fix problem with windows backslash

This commit is contained in:
sparkyx 2006-09-18 16:20:31 +00:00
parent b3851bdcb0
commit 14b77deabe
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ include_once("constant.php");
*
*/
function echo_error ($p_log, $p_line="", $p_message="") {
$fdebug=fopen("phpcompta_error.log","a+");
$fdebug=fopen($_ENV['TMP'].DIRECTORY_SEPARATOR."phpcompta_error.log","a+");
fwrite($fdebug,date("Ymd H:i:s").$p_log." ".$p_line." ".$p_message."\n");
fclose($fdebug);
echo_debug($p_log);

View file

@ -541,7 +541,7 @@ function FormVenteView ($p_cn,$p_jrn,$p_periode,$p_array,$p_number,$p_doc='form'
// if we were in the management module, appl. propose to generate an invoice
// if ( $_SERVER['PHP_SELF'] == '/commercial.php')
echo_debug('user_form_ven',__LINE__," _SERVER['PHP_SELF'] ".$_SERVER['PHP_SELF']);
if ( $_SERVER['PHP_SELF'] == '/commercial.php')
if ( basename($_SERVER['PHP_SELF']) == 'commercial.php')
{
// if a template exists propose to choose an invoice template
if ( CountSql($p_cn,