Jump to content

cant use include in a created php file, why?


opels

Recommended Posts

Hi there,

I run the below code to create a new php file

 

$fp2 = fopen("a.php", "w");

$P1= "<?php include (\"template.php\"); ?>";

fwrite ($fp2, $P1);

fclose ($fp2);

 

when I then display a.php in ie, I get a blank page

 

if I copy a.php to my computer, then ftp it back, I get a full page of text and images as expected.

 

Why ?

How can I solve this ?

 

Sorry can't,

 

preceeding template.php in the new .php file, a variable is set.

The problem is why this won't display propertly until I do a copy/paste to my computer and back to the ftp?

 

is it something to do with 'rights' or 'permissions' ?

or something else.

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.