Welcome Guest, Not a member yet? Register   Sign In
opening file on a server
#1

[eluser]jorx[LINUX][/eluser]
hey! i just want to ask....

do CI have a function that would open a file on a server...?

i want to access my file - http://localhost/file.php

but it won't work on write_file()

i'm force to use x:/xampp/htdocs/file.php

by the way im using xampp
#2

[eluser]Evil Wizard[/eluser]
do you have allow_url_fopen turned on?
#3

[eluser]jorx[LINUX][/eluser]
yes!!! I change some configuration that I think would make it work out like allow_url_fopen = On


I search for answer in the internet..
but still it wont work

is their a problem of using localhost in fopen????
#4

[eluser]Evil Wizard[/eluser]
if you do a var_dump() of the write_file() call does it return false?
what parameters are you using to call the helper function?
Code:
$blResult = write_file('http://localhost/file.php');
that would be the way to access via the URL
Code:
$blResult = write_file('./file.php');
that would access the file relative to the index.php file in the webroot.




Theme © iAndrew 2016 - Forum software by © MyBB