[Linux-programlama] Re: [PHP] Üst Dizinlerden Dosya Dahil Etmek ?

---------

[Linux-programlama] Re: [PHP] Üst Dizinlerden Dosya Dahil Etmek ?

From: Erdem ARTAN <badibere_at_gmail.com>
Date: Sat, 23 Aug 2008 20:55:03 +0300
Message-ID: <3d54862b0808231055j6818d738w83f693aaae1ea16b@mail.gmail.com>

Mehmet Bey çıktı şu şekildedir :

/var/www/localhost/htdocs/IEEE/index.php
/var/www/localhost/htdocs/IEEE/Settings/Mysql.php :: OK
../Settings/Mysql.php :: ERROR
------------------------------
MenuProcess
.
index.php~
Settings
..
index.php
------------------------------
pisi-index.xml~
index-ptbr.html
index-tr.html
pisi-index3.xml
icons
IEEE
pardus.png
index-es.html
index-de.html
pisi-index2.xml~
apache.css
apache_pb.gif
.
pisi-index2.xml
pisi-index.xml
..
pisi-index3.xml~
index.html
phpmyadmin

23 Ağustos 2008 Cumartesi 13:19 tarihinde Mehmet Gürevin <
mehmetgurevin_at_gmail.com> yazdı:

> eklemeyi unutmuşum, bu kodu include methodunu kullandığınız sayfada
> çalıştırmayı deneyin.
>
> 2008/8/23 Mehmet Gürevin <mehmetgurevin_at_gmail.com>:
> > <?php
> > echo($_SERVER['SCRIPT_FILENAME'].'<br>');
> >
> >
> if(file_exists('/var/www/localhost/htdocs/IEEE/Settings/Mysql.php')){
> > echo('/var/www/localhost/htdocs/IEEE/Settings/Mysql.php ::
> OK<br>');
> > }else{
> > echo('/var/www/localhost/htdocs/IEEE/Settings/Mysql.php ::
> ERROR<br>');
> > }
> >
> > if(file_exists('../Settings/Mysql.php')){
> > echo('../Settings/Mysql.php :: OK<br>');
> > }else{
> > echo('../Settings/Mysql.php :: ERROR<br>');
> > }
> >
> > echo('<hr>');
> >
> > $dh = opendir('./');
> > while($dir = readdir()){
> > echo($dir.'<br>');
> > }
> > closedir($dh);
> >
> > echo('<hr>');
> >
> > $dh = opendir('../');
> > while($dir = readdir()){
> > echo($dir.'<br>');
> > }
> > closedir($dh);
> >
> > echo('<hr>');
> > ?>
> > yukarıdaki kodun çıktısını gönderebilirmisiniz
> >
> > 2008/8/23 Erdem ARTAN <badibere_at_gmail.com>:
> >> 1) realpath kullanırken aldığım hata
> >>
> >> Warning: include() [function.include]: Failed opening '' for inclusion
> >> (include_path='.:/usr/share/php5/PEAR') in
> >> /var/www/localhost/htdocs/IEEE/MenuProcess/Settings.php on line 3
> >>
> >> 2) realpath KULLANMADAN aldığım hata
> >>
> >>
> >> Warning: include(../Settings/Mysql.php) [function.include]: failed to
> open
> >> stream: No such file or directory in
> >> /var/www/localhost/htdocs/IEEE/MenuProcess/Settings.php on line 2
> >>
> >> Warning: include() [function.include]: Failed opening
> >> '../Settings/Mysql.php' for inclusion
> >> (include_path='.:/usr/share/php5/PEAR') in
> >> /var/www/localhost/htdocs/IEEE/MenuProcess/Settings.php on line 2
> >>
> >>
> >> İlgili dosyalar yerlerinde mevcuttur.
> >>
> >> 23 Ağustos 2008 Cumartesi 13:03 tarihinde Mehmet Gürevin
> >> <mehmetgurevin_at_gmail.com> yazdı:
> >>>
> >>> yaptığınız işlemde bir sorun yok. include '../Settings/Mysql.php"
> >>> komutu ile dosya belirtildiği gibi varsa yani bir üst klasörde
> >>> Settings adında bir klasör ve onun içinde de Mysql.php dosyası varsa
> >>> yüklenmeli. sanırım başka bir sorun var.
> >>>
> >>> almış olduğunuz hatayıda yazsaydınız daha fazla yardımcı olabilidik
> >>> sanırım.
> >>>
> >>> 2008/8/23 Erdem ARTAN <badibere_at_gmail.com>:
> >>> > Merhaba,
> >>> >
> >>> > Php'de bir üst dizindeki Settings dizininin içerisinde bulunan
> Mysql.php
> >>> > yi
> >>> > dahil etmeye çalışıyorum.
> >>> >
> >>> > Bunun için
> >>> >
> >>> > include "../Settings/Mysql.php";
> >>> >
> >>> > ve
> >>> >
> >>> > $a = realpath("../Settings/Mysql.php");
> >>> > include $a;
> >>> >
> >>> > komutlarını ayrı ayrı denedim. Fakat her ikisi de hata verdi.
> >>> >
> >>> > PHP 5 yüklü sistemde.
> >>> >
> >>> > Sorun nedir?
> >>> >
> >>> > --
> >>> > Yarınları Görebilmem İçin Sadece Bir Işık!
> >>> >
> >>> > _______________________________________________
> >>> > Linux-programlama mailing list
> >>> > Linux-programlama_at_liste.linux.org.tr
> >>> > http://liste.linux.org.tr/mailman/listinfo/linux-programlama
> >>> >
> >>> >
> >>> _______________________________________________
> >>> Linux-programlama mailing list
> >>> Linux-programlama_at_liste.linux.org.tr
> >>> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
> >>
> >>
> >>
> >> --
> >> Yarınları Görebilmem İçin Sadece Bir Işık!
> >>
> >> _______________________________________________
> >> Linux-programlama mailing list
> >> Linux-programlama_at_liste.linux.org.tr
> >> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
> >>
> >>
> >
> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama_at_liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
>

-- 
Yarınları Görebilmem İçin Sadece Bir Işık!

_______________________________________________
Linux-programlama mailing list
Linux-programlama_at_liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama
Received on Sat 23 Aug 2008 - 20:19:08 EEST

---------

Bu arsiv hypermail 2.2.0 tarafindan uretilmistir.