fork(3) download
  1. <?php
  2. class Articles {
  3. public $dbc = mysqli_connect('localhost', 'admin', 'admin', 'test_task_one')
  4. or die("Ошибка при подключении к серверу");
  5. function create()
  6. {
  7. $query = "CREATE TABLE articles
  8. (
  9. id INT,
  10. title VARCHAR(60),
  11. text TEXT,
  12. datetime DATETIME
  13. ) " ;
  14.  
  15. mysqli_query($dbc, $query) or die (mysql_error());
  16. echo "string";
  17. }
  18. }
  19. $test = new Articles();
  20. $test ->create();
  21. ?>
Runtime error #stdin #stdout #stderr 0.02s 52432KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Parse error:  syntax error, unexpected '(', expecting ',' or ';' in /home/MWk92j/prog.php on line 3