Kód: Vybrať všetko
<?php
$file = file_get_contents('txt/akcia.txt', FILE_USE_INCLUDE_PATH);
echo $file;
?>Kód: Vybrať všetko
<?php
$file = file_get_contents('txt/akcia.txt', FILE_USE_INCLUDE_PATH);
echo $file;
?>Kód: Vybrať všetko
echo file_get_contents("./txt/akcia.txt");Kód: Vybrať všetko
echo file_get_contents("http://google.com");toto je velmi otazne lebo v php.ini mozes mat napevno nastavene allow_url_fopen na off a tu stranku ti nepovoli otvoritBX napísal:ti zobrazí?Kód: Vybrať všetko
echo file_get_contents("http://google.com");
Kód: Vybrať všetko
error_reporting(-1);
file_get_contents("./txt/akcia.txt");Kód: Vybrať všetko
Warning: file_get_contents(./txt/akcia.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /data/a/n/"nazov stranky"/web/akcia.php on line 30Kód: Vybrať všetko
<html>
<body>
<pre>
<?php include("Text.txt"); ?>
</pre>
</body>
</html>
Kód: Vybrať všetko
ked spravis file_get_contents('sem ide relativna cesta k prvemu skriptu co sa spustil');Kód: Vybrať všetko
file_get_contents('txt/akcia.txt');Kód: Vybrať všetko
var_dump($_SERVER["DOCUMENT_ROOT"].'/txt/akcia.txt'); //pozries sa ci ti cesta sedi
echo file_get_contents($_SERVER["DOCUMENT_ROOT"].'/txt/akcia.txt');Kód: Vybrať všetko
file_get_contents('', FILE_USE_INCLUDE_PATH);Kód: Vybrať všetko
foreach (explode(PATH_SEPARATOR,get_include_path()) as $value)
var_dump(realpath($value));
Kód: Vybrať všetko
file_get_contents('txt/akcia.txt');Kód: Vybrať všetko
var_dump($_SERVER["DOCUMENT_ROOT"].'/txt/akcia.txt'); //pozries sa ci ti cesta sedi
echo file_get_contents($_SERVER["DOCUMENT_ROOT"].'/txt/akcia.txt');Kód: Vybrať všetko
string(43) "/data/web/"nazov stranky"/web/txt/akcia.txt"Kód: Vybrať všetko
foreach (explode(PATH_SEPARATOR,get_include_path()) as $value)
var_dump(realpath($value));Kód: Vybrať všetko
string(29) "/data/a/n/"nazov stranky"/web" string(17) "/usr/php5/lib/php"Kód: Vybrať všetko
Warning: file_get_contents(txt/akcia.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /data/a/n/"nazov stranky"/web/akcia.php on line 30Kód: Vybrať všetko
string(43) "/data/web/"nazov stranky"/web/txt/akcia.txt"
Warning: file_get_contents(/data/web/"nazov stranky"/web/txt/akcia.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /data/a/n/"nazov stranky"/web/akcia.php on line 31Kód: Vybrať všetko
Warning: file_get_contents(txt/akcia.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /data/a/n/"nazov stranky"/web/akcia.php on line 30Kód: Vybrať všetko
string(29) "/data/a/n/"nazov stranky/web" string(17) "/usr/php5/lib/php"Kód: Vybrať všetko
http://stranka/obrazok