Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call to undefined function phpinclude_once()

Tags:

php

I'm making a new php page and I get the error

Fatal error: Call to undefined function phpinclude_once() in /home8/nuventio/public_html/marketing/pb2/dashboard.php on line 1

I'm not sure why I'm getting this error, I've done previous pages the same way as this with no problems. This is the line in question:

<?php
include_once("../utils.php");
?>

After that it just goes into regular HTML code. It works fine without that line.

like image 528
Alex Zylman Avatar asked Dec 06 '22 02:12

Alex Zylman


2 Answers

try making sure there is an enter between your <?php and your include_once

It seems like you might have short tags, and it is interpreting it as:

<? = Open Tag
phpinclude_once("../utils.php"); = Function call

So just put an extra line or something in there. You could even just add a few semicolons for the heck of it.

like image 101
Tyler Carter Avatar answered Dec 16 '22 12:12

Tyler Carter


Perhaps your editing program is saving your PHP files using only carriage-return style newlines (\r or 0x0D)

Because, as far as I know*, the parser will only recognize linefeed-style newlines (\n or 0x0A)

*Someone please correct me if I'm wrong on this one.

EDIT

Could also be a transfer issue - I believe some FTP programs will do newline conversion and other OS-specific stuff.

like image 35
Peter Bailey Avatar answered Dec 16 '22 10:12

Peter Bailey