Jump to content

calling url as a file?


Lefu

Recommended Posts

hi,

 

A)I used to call my files this way:

  Quote
I don't use this anymore because (allow_url_include = off)  disabled by the hosting company.

 

B)So I have to use: 

  Quote
$html =  implode("","http://localhost/opened/ace.php?codec=23");

echo $html;

Gives the php code like echo " hello world";

 

How can I get : hello world.

 

Thanks for your positive input.

Link to comment
https://forums.phpfreaks.com/topic/84440-calling-url-as-a-file/
Share on other sites

thank you,

 

I code in side the browser, put my code into firebird db, and now I want to retrieve that code and display the results on the browser.

 

I am hoping that you understand where i am,

 

the code i.e

  Quote
function checkbox($val)

{//purpose of this function is to return the value of a checkbox

if ($val){

  return 1;

}else{

  return 0;

}

}

echo checkbox("yes");

would give 1, since this is in the db, I want to see 1 on my browser not  the actual code which produced 1.

 

at the moment

 

B) is giving the code not the results of it.

 

I can use curl functions and write things in the a php file then include that file but it would be violating many laws, like response time.

 

I believe there is a way of calling url as a file, I don't know the way.

 

Link to comment
https://forums.phpfreaks.com/topic/84440-calling-url-as-a-file/#findComment-430205
Share on other sites

Ahh I get it actually it should not... maybe because your using localhost it is... but on a full fetched domain it should not unless your using shortags "<?" and your server is configured for "<?php" tags it will not show the source code... have you tried using file_get_contents

Link to comment
https://forums.phpfreaks.com/topic/84440-calling-url-as-a-file/#findComment-430210
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.