Tarih: 2007-09-30, 01:13:10 Mesaj konusu: Nuke teması içinde word dosyası açmak
Merhaba arkadaşlar;
Sorun şu herhangi bir *.htm dosyasını nuke teması içinde görüntüleyebiliyoruz aynı şeyi *.doc word dosyası içinde yapabilirmiyiz. Word dosyası resimli de olabilmeli.
Saho bey php classes for excel , php doc parse diye arat dedi ama sonuca ulaşamadım.
Yardımcı olursanız sevinirim.
Kayıt: Mar 18, 2005 Mesajlar: 2176 Konum: istanbul-tokat
Tarih: 2007-09-30, 05:15:05 Mesaj konusu:
dediğiniz gibi yapınca htm yi include ediyordur öyle kafasına göre normal bir yazı gibi .doc .xls gibi dosyları include edemezsiniz
excel için class vardı wordpad
http://tr2.php.net/COM bu sayfada
word.application geçen kısımları araştırabilirsiniz
aşağıdaki class ile .doc dosyaları açabilirsiniz mesala ...
Kod:
Useful PHP MSWord class I created to do some simple file conversions. This class could have a lot more to it but I am not familiar with all the COM MS Word function calls.
<?php
// msword.inc.php
// NOTE: Using COM with windows NT/2000/XP with apache as a service
// - Run dcomcnfg.exe
// - Find word application and click properties
// - Click the Security tab
// - Use Custom Access Permissions
// - Add the user who runs the web server service
// - Use Custom Launch permissions
// - Add the user who runs the web server service
// Create COM instance to word
function MSWord($Visible = false)
{
$this->handle = new COM("word.application") or die("Unable to instanciate Word");
$this->handle->Visible = $Visible;
}
// Open existing document
function Open($File)
{
$this->handle->Documents->Open($File);
}
// Create new document
function NewDocument()
{
$this->handle->Documents->Add();
}
// Write text to active document
function WriteText( $Text )
{
$this->handle->Selection->Typetext( $Text );
}
// Number of documents open
function DocumentCount()
{
return $this->handle->Documents->Count;
}
// Save document as another file and/or format
function SaveAs($File, $Format = 0 )
{
$this->handle->ActiveDocument->SaveAs($File, $Format);
}
// Save active document
function Save()
{
$this->handle->ActiveDocument->Save();
}
// close active document.
function Close()
{
$this->handle->ActiveDocument->Close();
}
// Get word version
function GetVersion()
{
return $this->handle->Version;
}
// get handle to word
function GetHandle()
{
return $this->handle;
}
// Clean up instance with word
function Quit()
{
if( $this->handle )
{
// close word
$this->handle->Quit();
ilgin için teşekkürler üstat ama php konusundaki fazla olmayan bilgimden dolayı class uygulamaları hakkında bilgim yok tema içinde herhangi bir word dosyasını gösterebilecek hale getirebilirseniz sevinirim
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız