how call .php
outside the folder
my folder structurer is
I'm in cart.php
my code is
$tpl_file ='../mail.php';//problem is here LINE 279
$msg_tmpl = file_get_contents($tpl_file);
if (!file_exists($tpl_file))
{
?>
<script>
alert('no');
</script>
<?php
}
else
{
?>
<script>
alert('yes');
</script>
<?php
}
So my question is I want to get all data from the mail.php
and assign it $tpl_file
.
In above try I'm getting always NO with
A PHP Error was encountered
Severity: Warning
Message: file_get_contents(../mail.php): failed to open stream: No such file or directory
Filename: pages/cart.php
Line Number: 279
any Ideas??
Change
$tpl_file ='../mail.php';
To
$tpl_file ='application/views/pages/mail.php';
NOTE: From your screenshot,mail.php
is located in application/views/pages/mail.php
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments