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

---------

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

From: Mehmet Gürevin <mehmetgurevin_at_gmail.com>
Date: Sat, 23 Aug 2008 13:19:10 +0300
Message-ID: <1635d1bf0808230319x481bb5b1v4ffaf45f34016a2a@mail.gmail.com>

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
Received on Sat 23 Aug 2008 - 12:43:09 EEST

---------

Bu arsiv hypermail 2.2.0 tarafindan uretilmistir.