I get error in PHP which wasn't before

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nadavvin
Forum Commoner
Posts: 68
Joined: Wed Sep 06, 2006 6:05 am

I get error in PHP which wasn't before

Post by nadavvin »

I've a PHP script which work on my site for some days.
Today is also work but now that I access my website I get two errors

The site:
http://wiki.555mb.com/example/blog.php

Its code:

Code: Select all

<?php
$xml = new DOMDocument;
$xml->load('a.xml');

$xsl = new DOMDocument;
$xsl->load('Happy_Blog.xsl');
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules
echo $proc->transformToXML($xml);
?>
The errors:

Code: Select all

Warning: domdocument() expects at least 1 parameter, 0 given in /home/vhosts/wiki.555mb.com/example/blog.php on line 2

Fatal error: Call to undefined function: load() in /home/vhosts/wiki.555mb.com/example/blog.php on line 3
Whats happen???
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

What does

Code: Select all

<?php
foreach( get_loaded_extensions() as $m ) {
	if ( false!==strpos('dom', $m) ) {
		echo $m, "<br />\n";
	}
}
?>
print?
nadavvin
Forum Commoner
Posts: 68
Joined: Wed Sep 06, 2006 6:05 am

Post by nadavvin »

It's return nothing.
nadavvin
Forum Commoner
Posts: 68
Joined: Wed Sep 06, 2006 6:05 am

Post by nadavvin »

It's have domxml.

I remve the if and now it's give:

Code: Select all

yp
xml
wddx
tokenizer
sysvshm
sysvsem
standard
sockets
shmop
session
pspell
posix
pcre
overload
mime_magic
iconv
gmp
gettext
ftp
exif
dio
dbx
dba
curl
ctype
calendar
bz2
bcmath
zlib
openssl
apache2handler
domxml
gd
mbstring
mysql
ncurses
xmlrpc
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

You are using the http://de2.php.net/dom object and methods.
They are not available for if it's domxml, check http://de2.php.net/domxml
Post Reply