Jump to content

PHP not seeing linebreak?


playaz

Recommended Posts

Hi guys,

 

Having to take over an ex-employees project and have moved it onto one of your PHP5 servers - I instantly get the following error :-

Fatal error: Call to undefined function phpdefine() in /home/cclients/public_html/chart/conf.php on line 1

 

For some reason the opening php tag and the define() tag in the conf.php file are 'merging' to look like on tag - however upon viewing the code their is definately spacing between these - it would seem that PHP isn't recognising the line break between but have no idea why this has happened?

 

Can anyone suggest how to get PHP to see it as two words rather than phpdefine()

 

Thanks in advance.. pulling my hair out at the minute lol :(

Link to comment
https://forums.phpfreaks.com/topic/194761-php-not-seeing-linebreak/
Share on other sites

Hi Guys,

 

I'm using phpDesigner and the file looks like this..

<?php
   require('./conf.php');

  // all the other code in the script...
?>

 

As you can see the file itself looks fine, but for some reason it is reading the php & require as one like this 'phprequire' - so for some reason it doesnt see the line break when outputted in the php.. Can you suggest why this is happening & way to remedy this problem (never come across this issue before)

 

Thanks

 

I would suspect that phpDesigner has a linebreak setting that is incompatible with the environment that the php is running in.

 

Have a look for a linbreak config setting and perhaps add an actual space char after the <?php to be sure, but I think it is the linebreak type, which is different for Windows/DOS, unix and mac

Have a look for a linbreak config setting and perhaps add an actual space char after the <?php to be sure, but I think it is the linebreak type, which is different for Windows/DOS, unix and mac

I think your right it does sound like the file format, i've tried Unix/Windows & Mac still no avail - i'll try it in another editor and see if i get any joy.. i hate taking on other people's project.. :-(

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.