Failed opening 'Editor-PHP-1.7.3.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php'
Failed opening 'Editor-PHP-1.7.3.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php'
My Editor-PHP-1.7.3.php folder is within my public_html.
This is my code in my index.php
<?php include ('Editor-PHP-1.7.3.php');?>
Errors:
Warning: include(/storage/ssd3/634/3741634/public_html/Editor-PHP-1.7.3.php): failed to open stream: No such file or directory in /storage/ssd3/634/3741634/public_html/index.php on line 2
Warning: include(): Failed opening 'Editor-PHP-1.7.3.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /storage/ssd3/634/3741634/public_html/index.php on line 2
I am guessing this is a pretty simple fix. But I have never had to use an include to a uploaded extracted-zip-package folder before.
Thanks!
This question has an accepted answers - jump to answer
Answers
Editor-PHP-1.7.3.php
sounds like a file name, not a directory (folder). But there isn't one by that name in the Editor package.When you unzip the
Editor-PHP-1.7.3.zip
file, you should get a directory calledEditor-PHP-1.7.3
. Inside that are various files for Editor.The getting started documentation for PHP has full details.
Allan
At some point I added the .php trying to get it to work (and forgot to remove it). I removed the .php but nothing changed.
Correct all the files are within the folder Editor-PHP-1.7.3 folder on my webhost. The exact same ones zipped on my desktop downloaded from datatables.
Ok I will checkout the link.
You wouldn't normally include just the directory itself, but rather a specific file inside it -
Editor-PHP-1.7.3/php/DataTables.php
for example.But yes, try walking through the docs as that will show you how to install the demo package.
Allan
Is 'staff' referring to the table name in the SQL database?
Editor::inst( $db, 'staff' )
->fields(
Field::inst( 'first_name' ),
Field::inst( 'last_name' ),
Field::inst( 'position' ),
Field::inst( 'email' ),
Field::inst( 'office' )
);
That is correct, yes. And the
Field
instance parameters are the column names.Allan