Re: [greenstone-users] Get my collection name from a class attribute inPHP 5 progamming on greenstone

From Oran Fry
DateMon, 05 Nov 2007 09:27:13 +1300
Subject Re: [greenstone-users] Get my collection name from a class attribute inPHP 5 progamming on greenstone
In-Reply-To (356451-43921-qm-web25809-mail-ukl-yahoo-com)
Hi Bertrand,

Do you see any error messages when you run your php script?

Does it still fail when you use a literal collection name? If so it is probably not a problem with PHP objects.
import.pl -removeold demo

Have you tried using quotes?
shell_exec( "import.pl -removeold " . $up->getDocCollectionDest() );

Or creating the command as a string and checking it first?
$import_command = "import.pl -removeold " . $up->getDocCollectionDest();
var_dump($import_command); //check that everything looks good
shell_exec($import_command);

Let us know if you still have trouble.

Kind Regards,
Oran.


Bertrand SODJAHIN wrote:
Hello everybody !
I'm progamming in PHP oriented object. I have the a classe UploadDocument. So an object of that class has several attibute. One of them is the name of the greenstone collection in wich it'll be uploaded. A fuction of that class named getDocCollectionDest() , returns that name. I called my current object up . While importing, building et activating the collection (in CLI using PHP Shell_exec), I wrote this code :
import.pl -removeold $up->getDocCollectionDest()
buildcol.pl $up->getDocCollectionDest()


But it's not working. I think it's failing ta manage $up->getDocCollectionDest()  as a collection name. Please Help me as soon as possible.
Many thanks in advance.
Bertrand


Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail

_______________________________________________ greenstone-users mailing list greenstone-users@list.scms.waikato.ac.nz https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users