收录日期:2019/09/19 00:20:04 时间:2013-09-19 00:00:23 标签:php,mysql

I have a news script and the install file doesn't add any SQL data to my database.

This is the code and I assure you that the config file is good, with no errors in it.

You can receive any errors and take appropriate action on that. Make sure that you put these lines on top of your script to see any errors:

ini_set('display_errors', true);
error_reporting(E_ALL);

Also instead of:

mysql_query($sql);

Use:

mysql_query($sql) or die(mysql_error());

to see if there are any errors in the query itself.

Finally try using full php tags <?php ... ?> instead of <? ... ?> because chances are that short tags are disabled on your server.