0

I can't to connect to ajax conf.php file because of (_JEXEC) then i use jquery code:

$.ajax
({
type: "POST",
url: "conf.php",
data: dataString,
cache: false,
success: function(html)
{
$("#flash").fadeOut("slow");
$("#content").html(html);
} 
});
});

How can I connect in other working way to that file ?

Jonuux
  • 533
  • 1
  • 7
  • 20

1 Answers1

1

The code defined( '_JEXEC' ) or die( 'Restricted access' ); usually restricts ajax

functions therefore you will need to use define('_JEXEC', 1);

Notice that you need to use define, not defined

Lodder
  • 19,758
  • 10
  • 59
  • 100
  • I have a new problem here, it's really strange - When I use some of joomla methods for example JRequest:getDbo etc. the conf.php files refuses to work. But if I use simple insert to mysql code, it works fine. What is wrong with it ? – Jonuux Sep 08 '12 at 09:03
  • @Jonuux - please ask a new question regarding this problem with a bit more detail. thanks. – Lodder Sep 09 '12 at 23:08