New Posts  All Forums:Forum Nav:

PHP messup

post #1 of 11
Thread Starter 
Quote:
if (!$myxml=simplexml_load_file('xteam.xml')){

echo 'Error reading the XML file';

}

foreach($myxml as $movie){

echo 'Title: ' . $movie->ladder . '<br />';

}

Im trying to get this to load in an xml file, but im just getting this.

Quote:
Fatal error: Call to undefined function: simplexml_load_file() in /home/content/x/s/x/xsxsquad/html/matches.php on line 14
Each time. Can anyone spot anything wrong?

edit: i changed that variable to movie, but that wasnt the prob so ignore that
    
CPUMotherboardGraphicsRAM
Core 2 Quad Q6600 (B3) Abit IB9 - P965 chipset XFX 8600GTS 752mhz core 4GB DDR2 667mhz 
Hard DriveOSMonitorKeyboard
770GB Windows Vista 64bit/Ubuntu 64bit 2x17" Samsung LCDTV/Monitor Logitech Wireless 
PowerCaseMouse
500w Xion Black Logitech Laser wireless 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Core 2 Quad Q6600 (B3) Abit IB9 - P965 chipset XFX 8600GTS 752mhz core 4GB DDR2 667mhz 
Hard DriveOSMonitorKeyboard
770GB Windows Vista 64bit/Ubuntu 64bit 2x17" Samsung LCDTV/Monitor Logitech Wireless 
PowerCaseMouse
500w Xion Black Logitech Laser wireless 
  hide details  
Reply
post #2 of 11
Try this:

Code:
$myxml = simplexml_load_file('xteam.xml');

if (!$myxml){

echo 'Error reading the XML file';

}

foreach($myxml as $movie){

echo 'Title: ' . $competitioninformation->ladder . '<br />';

}
You might want to exit the execution of the script as well if an error occurs with exit;

Oh and also CHECK you have the latest version of PHP. I understand that the simplexml_load_file() function requires PHP 5 and above.
Bob
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Athlon 64 3800+ ASUS A8N- SLI Premium XFX GeForce 7800GT Extreme Edition 2GB (2X1GB) Corsair XMS Pro LED TwinX DDR400 
Hard DriveOptical DriveOSMonitor
2x200GB Barracuda SATA RAID0 + 250Gb ATA SONY CDR-RW Ultra speed Windows Vista Home Premium x64 Hanns G 19" widescreen HW191D 
PowerCaseMouse
Antec TruePower 550W Thermaltake Armour Logitech LX5 
  hide details  
Reply
Bob
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Athlon 64 3800+ ASUS A8N- SLI Premium XFX GeForce 7800GT Extreme Edition 2GB (2X1GB) Corsair XMS Pro LED TwinX DDR400 
Hard DriveOptical DriveOSMonitor
2x200GB Barracuda SATA RAID0 + 250Gb ATA SONY CDR-RW Ultra speed Windows Vista Home Premium x64 Hanns G 19" widescreen HW191D 
PowerCaseMouse
Antec TruePower 550W Thermaltake Armour Logitech LX5 
  hide details  
Reply
post #3 of 11
Code:
Fatal error: Call to undefined function: simplexml_load_file() in /home/content/x/s/x/xsxsquad/html/matches.php on line 14
which means, in layman's terms, your PHP installation doesn't have support for simplexml_load_file()

According to php.net, this feature was added in PHP 5.0, so unless you have the libraries, it's not going to work.

Quote:
Originally Posted by PHP.net
The SimpleXML extension requires PHP 5.
EDIT:

You can get PHP 5 here: http://www.php.net/downloads.php
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
Athlon XP 2600+ Abit NF7-S v2 6600GT AGP 8x 1GB(2x512) PC2100 
Hard DriveOSMonitorKeyboard
80GB IDE WinXP Pro SP1 15&quot; LCD (Analog) Wireless Logitec 
PowerCaseMouse
400W Generic Beige Mid-Tower Wireless 8-button Logitec 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
Athlon XP 2600+ Abit NF7-S v2 6600GT AGP 8x 1GB(2x512) PC2100 
Hard DriveOSMonitorKeyboard
80GB IDE WinXP Pro SP1 15&quot; LCD (Analog) Wireless Logitec 
PowerCaseMouse
400W Generic Beige Mid-Tower Wireless 8-button Logitec 
  hide details  
Reply
post #4 of 11
Yeh
Bob
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Athlon 64 3800+ ASUS A8N- SLI Premium XFX GeForce 7800GT Extreme Edition 2GB (2X1GB) Corsair XMS Pro LED TwinX DDR400 
Hard DriveOptical DriveOSMonitor
2x200GB Barracuda SATA RAID0 + 250Gb ATA SONY CDR-RW Ultra speed Windows Vista Home Premium x64 Hanns G 19" widescreen HW191D 
PowerCaseMouse
Antec TruePower 550W Thermaltake Armour Logitech LX5 
  hide details  
Reply
Bob
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Athlon 64 3800+ ASUS A8N- SLI Premium XFX GeForce 7800GT Extreme Edition 2GB (2X1GB) Corsair XMS Pro LED TwinX DDR400 
Hard DriveOptical DriveOSMonitor
2x200GB Barracuda SATA RAID0 + 250Gb ATA SONY CDR-RW Ultra speed Windows Vista Home Premium x64 Hanns G 19" widescreen HW191D 
PowerCaseMouse
Antec TruePower 550W Thermaltake Armour Logitech LX5 
  hide details  
Reply
post #5 of 11
Quote:
Originally Posted by sniperscope
Yeh
Yeh?



Did it work?
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
Athlon XP 2600+ Abit NF7-S v2 6600GT AGP 8x 1GB(2x512) PC2100 
Hard DriveOSMonitorKeyboard
80GB IDE WinXP Pro SP1 15&quot; LCD (Analog) Wireless Logitec 
PowerCaseMouse
400W Generic Beige Mid-Tower Wireless 8-button Logitec 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
Athlon XP 2600+ Abit NF7-S v2 6600GT AGP 8x 1GB(2x512) PC2100 
Hard DriveOSMonitorKeyboard
80GB IDE WinXP Pro SP1 15&quot; LCD (Analog) Wireless Logitec 
PowerCaseMouse
400W Generic Beige Mid-Tower Wireless 8-button Logitec 
  hide details  
Reply
post #6 of 11
Quote:
Originally Posted by xxmonkey321xx
Yeh?

Did it work?
lol that's not the guy who asked the question.
Pumpmaster Flex
(17 items)
 
  
CPUMotherboardGraphicsRAM
i7-6700k Gigabyte GA-Z170X-UD5 ASUS ROG STRIX GTX 1080 TI 11GB G.SKILL Ripjaws V Series 16GB DDR4 3200 
Hard DriveCoolingOSKeyboard
Samsung 850 EVO 500 GB Cryorig H7 Windows 10 Pro Ducky One TKL Side Print PBT 
PowerCaseMouseMouse Pad
EVGA SuperNOVA 850w Fractal Design Define R5 Black Silent Logitech G502 Proteus Core SteelSeries QcK Heavy 
AudioOtherOtherOther
Schiit Magni 2 + Modi 2 Sennheiser HD 598 Special Edition Over-Ear Head... Audio-Technica ATH-M50 Headphones AntLion ModMic 
Other
Sennheiser HD 650 
  hide details  
Reply
Pumpmaster Flex
(17 items)
 
  
CPUMotherboardGraphicsRAM
i7-6700k Gigabyte GA-Z170X-UD5 ASUS ROG STRIX GTX 1080 TI 11GB G.SKILL Ripjaws V Series 16GB DDR4 3200 
Hard DriveCoolingOSKeyboard
Samsung 850 EVO 500 GB Cryorig H7 Windows 10 Pro Ducky One TKL Side Print PBT 
PowerCaseMouseMouse Pad
EVGA SuperNOVA 850w Fractal Design Define R5 Black Silent Logitech G502 Proteus Core SteelSeries QcK Heavy 
AudioOtherOtherOther
Schiit Magni 2 + Modi 2 Sennheiser HD 598 Special Edition Over-Ear Head... Audio-Technica ATH-M50 Headphones AntLion ModMic 
Other
Sennheiser HD 650 
  hide details  
Reply
post #7 of 11
Quote:
Originally Posted by TriplePlay
lol that's not the guy who asked the question.
Quote:
Yeh?



Did it work?
lol read the whole topic!!
Bob
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Athlon 64 3800+ ASUS A8N- SLI Premium XFX GeForce 7800GT Extreme Edition 2GB (2X1GB) Corsair XMS Pro LED TwinX DDR400 
Hard DriveOptical DriveOSMonitor
2x200GB Barracuda SATA RAID0 + 250Gb ATA SONY CDR-RW Ultra speed Windows Vista Home Premium x64 Hanns G 19" widescreen HW191D 
PowerCaseMouse
Antec TruePower 550W Thermaltake Armour Logitech LX5 
  hide details  
Reply
Bob
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Athlon 64 3800+ ASUS A8N- SLI Premium XFX GeForce 7800GT Extreme Edition 2GB (2X1GB) Corsair XMS Pro LED TwinX DDR400 
Hard DriveOptical DriveOSMonitor
2x200GB Barracuda SATA RAID0 + 250Gb ATA SONY CDR-RW Ultra speed Windows Vista Home Premium x64 Hanns G 19" widescreen HW191D 
PowerCaseMouse
Antec TruePower 550W Thermaltake Armour Logitech LX5 
  hide details  
Reply
post #8 of 11
Quote:
Originally Posted by sniperscope
lol read the whole topic!!
I did... wasn't he asking YOU if it worked, since he said "Yeh?" then asked if it worked...
Pumpmaster Flex
(17 items)
 
  
CPUMotherboardGraphicsRAM
i7-6700k Gigabyte GA-Z170X-UD5 ASUS ROG STRIX GTX 1080 TI 11GB G.SKILL Ripjaws V Series 16GB DDR4 3200 
Hard DriveCoolingOSKeyboard
Samsung 850 EVO 500 GB Cryorig H7 Windows 10 Pro Ducky One TKL Side Print PBT 
PowerCaseMouseMouse Pad
EVGA SuperNOVA 850w Fractal Design Define R5 Black Silent Logitech G502 Proteus Core SteelSeries QcK Heavy 
AudioOtherOtherOther
Schiit Magni 2 + Modi 2 Sennheiser HD 598 Special Edition Over-Ear Head... Audio-Technica ATH-M50 Headphones AntLion ModMic 
Other
Sennheiser HD 650 
  hide details  
Reply
Pumpmaster Flex
(17 items)
 
  
CPUMotherboardGraphicsRAM
i7-6700k Gigabyte GA-Z170X-UD5 ASUS ROG STRIX GTX 1080 TI 11GB G.SKILL Ripjaws V Series 16GB DDR4 3200 
Hard DriveCoolingOSKeyboard
Samsung 850 EVO 500 GB Cryorig H7 Windows 10 Pro Ducky One TKL Side Print PBT 
PowerCaseMouseMouse Pad
EVGA SuperNOVA 850w Fractal Design Define R5 Black Silent Logitech G502 Proteus Core SteelSeries QcK Heavy 
AudioOtherOtherOther
Schiit Magni 2 + Modi 2 Sennheiser HD 598 Special Edition Over-Ear Head... Audio-Technica ATH-M50 Headphones AntLion ModMic 
Other
Sennheiser HD 650 
  hide details  
Reply
post #9 of 11
Quote:
Originally Posted by TriplePlay
I did... wasn't he asking YOU if it worked, since he said "Yeh?" then asked if it worked...
Oh, I was saying "read the whole topic" to xxmonkey321xx but I get it now... I thought that he thought I was asking the question in the first place... meh im confused now lol don't worry about it
Bob
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Athlon 64 3800+ ASUS A8N- SLI Premium XFX GeForce 7800GT Extreme Edition 2GB (2X1GB) Corsair XMS Pro LED TwinX DDR400 
Hard DriveOptical DriveOSMonitor
2x200GB Barracuda SATA RAID0 + 250Gb ATA SONY CDR-RW Ultra speed Windows Vista Home Premium x64 Hanns G 19" widescreen HW191D 
PowerCaseMouse
Antec TruePower 550W Thermaltake Armour Logitech LX5 
  hide details  
Reply
Bob
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Athlon 64 3800+ ASUS A8N- SLI Premium XFX GeForce 7800GT Extreme Edition 2GB (2X1GB) Corsair XMS Pro LED TwinX DDR400 
Hard DriveOptical DriveOSMonitor
2x200GB Barracuda SATA RAID0 + 250Gb ATA SONY CDR-RW Ultra speed Windows Vista Home Premium x64 Hanns G 19" widescreen HW191D 
PowerCaseMouse
Antec TruePower 550W Thermaltake Armour Logitech LX5 
  hide details  
Reply
post #10 of 11
Well i figred if i left enough space in between you'd know i wasnt talking to you anymore..

I was, in fact, asking the topic starter
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
Athlon XP 2600+ Abit NF7-S v2 6600GT AGP 8x 1GB(2x512) PC2100 
Hard DriveOSMonitorKeyboard
80GB IDE WinXP Pro SP1 15&quot; LCD (Analog) Wireless Logitec 
PowerCaseMouse
400W Generic Beige Mid-Tower Wireless 8-button Logitec 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
Athlon XP 2600+ Abit NF7-S v2 6600GT AGP 8x 1GB(2x512) PC2100 
Hard DriveOSMonitorKeyboard
80GB IDE WinXP Pro SP1 15&quot; LCD (Analog) Wireless Logitec 
PowerCaseMouse
400W Generic Beige Mid-Tower Wireless 8-button Logitec 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding