
06.04.2008, 14:52
|
|
Познающий
Регистрация: 13.03.2007
Сообщений: 75
С нами:
10085625
Репутация:
13
|
|
Глянул ща в логи упал
[client **.***.***.123] PHP Warning: set_time_limit(): Cannot set time limit in safe mode in /var/www/vhosts/***.ru/subdomains/**/httpdocs/test.php on line 3
[client **.***.***.123] PHP Notice: Use of undefined constant r - assumed 'r' in /var/www/vhosts/***.ru/subdomains/***/httpdocs/test.php on line 22
[client **.***.***.123] PHP Notice: Undefined variable: string in /var/www/vhosts/***.ru/subdomains/***/httpdocs/test.php on line 36
[client **.***.***.123] PHP Notice: Undefined variable: string in /var/www/vhosts/***.ru/subdomains/***/httpdocs/test.php on line 37
А вот содержимое фаила самого...мб кто подскажет чо править тут...=\
PHP код:
<?
set_time_limit(0);
//Base
$host = 'localhost';
$user = '***';
$pass = '***';
$db = '***';
$conn=mysql_connect($host,$user,$pass) ;
mysql_select_db($db);
//
$bla="CREATE TABLE `bla`
(
`id` int(3) NOT NULL auto_increment primary key,
`text` text NOT NULL
)";
mysql_query($bla);
$file='anekdot.txt';
$open=fopen($file,r);
while($fp=fgets($open,'511'))
{
if(strpos($fp,'/- New -/') !==false)
{
while(true)
{
$fp=fgets($open,'511');
if(strpos($fp,'/- New -/') !==false)break;
$fp .="<br>\n";
$string .= $fp;
}
}
}
echo $string;//Показывает состояние
if(strlen($string)!=0)mysql_query("INSERT INTO `bla` (`text`) VALUES ('$string')");
?>
Все строки соблюдены 
Последний раз редактировалось Stern; 06.04.2008 в 14:57..
|
|
|