Reply to fopen php5 htaccess question

Your name:

Reply:


Posted by Mike on 11/15/05 23:09

Hello,
Im doing this in php5, apache
Im not sure where the problem lies but I have a file
<?php
Class CreateXML{
public function xmlDeclaration(){
return $varxmlDec = "<?xml version='1.0'> ";
}
public function rssDeclaration(){
return $varrssDec = "<rss version='2.0'>";
}
}

?>


THAT IS CALLED BY:

<?php
include "XmlClass.php";

$test = new CreateXML();
$varxmlDec = $test->xmlDeclaration();
$varrssDec = $test->rssDeclaration();

$data = $test->varxmlDec.$test->varrssDec;
$file = "newfile.xml";
if (!$file_handle = fopen($file,"a")) { echo "Cannot open file"; }
if (!fwrite($file_handle, $data)) { echo "Cannot write to file"; }
echo "You have successfully written data to $file";
fclose($file_handle);
?>

THIS DOES NOT WORK.(But I dont think so)
It may have something to do with a .htaccess file

If I use: AddHandler application/x-httpd-php4 .php .php4 .php3 .phtml
..htm .html
I get a dalog box that asks me if I want to open/download
writetestxml.php (which is the file I'm accessing)
I trie using ......-httpd-php4 but the same thing happens.

Help!
Thanks
Mike

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация