-2

I need to create an OPC file for which I am using Log.bib file and I want to include it in php without using any plugin.

I've tried using include or require but its not working.

require_once 'Log.bib';
include 'Log.bib';
Aditya yadav
  • 119
  • 1
  • 7
  • `.bib` files are not PHP or text files, so you can't include them without a third-party plugin that will parse these BibText files. – node_modules Mar 22 '16 at 10:06
  • You'll need to `file_get_contents("filename.bib")` and then go through the process of manually parsing the contents, or you can do the sane thing and take advantage of someone else's work (e.g. https://people.mmci.uni-saarland.de/~jilles/prj/phpBibLib/) and not reinvent the wheel. – apokryfos Mar 22 '16 at 10:08
  • @C0dekid Can you please suggest any of the plugins. – Aditya yadav Mar 22 '16 at 10:10
  • @Adityayadav You can try out this: https://people.mmci.uni-saarland.de/~jilles/prj/phpBibLib (Also see comment about the file_get_contents. – node_modules Mar 22 '16 at 10:11
  • Actually I want to call one function(with parameters) present in Log.bib file, how can we call this function(with parameters) in php. – Aditya yadav Mar 22 '16 at 10:19

1 Answers1

0

PHP can't include or read BIB file without specific library : Use PHP BibText Library

https://people.mmci.uni-saarland.de/~jilles/prj/phpBibLib/

Or any other library like :

http://www.monperrus.net/martin/bibtexbrowser/

M4HdYaR
  • 1,124
  • 11
  • 27