读取文件的相对目录(Relative directory to read file)
我正在使用IBM Integration Bus v.9
我尝试从文件中读取配置,就像本教程一样 。
根据文档,我已经在Windows中设置了我的环境变量,如下所示:MQSI_FILENODES_ROOT_DIRECTORY到C:\ MQSIFileInput
在File Read Node属性中,我将输入目录设置为“config”(不带),因为该文件位于C:\ MQSIFileInput \ config目录中。
当我运行时,我收到错误“目录配置不是一个有效的目录名称”。 我在这里想念的是什么? 我是否需要设置其他配置才能正确读取文件?
谢谢。
I am using IBM Integration Bus v.9
I try to read configuration from file, like this tutorial.
Based on the documentation, I've already set up my environment variable in Windows like this : MQSI_FILENODES_ROOT_DIRECTORY to C:\MQSIFileInput
In the File Read Node properties, i set input directory to "config" (without apos), because the file located in C:\MQSIFileInput\config directories.
When I run, i got error "The directory config is not a valid directory name". What am I missing here? Do I need to set up another configuration to read the file properly?
Thank you.
原文:https://stackoverflow.com/questions/27898031
最满意答案
因为Guzzle
class Result implements ResultInterface
扩展ArrayAccess
class Result implements ResultInterface
,ArrayAccess
你必须使用$result['retry_after']
来获取你的属性。var_dump( $result['retry_after'] ); var_dump( isset( $result['retry_after'] ) );
Because Guzzle
class Result implements ResultInterface
which extendsArrayAccess
you'll have to use$result['retry_after']
to get your property.var_dump( $result['retry_after'] ); var_dump( isset( $result['retry_after'] ) );
相关问答
更多-
测试属性是否存在(Testing if property exists)[2023-12-02]
因为property_exists会告诉你,如果它甚至是一个定义的类/对象的属性,因为isset没有做出这样的区别。 例如: class A { protected $hello; } class B { } 在类A中使用property_exists($this, 'hello')将返回true ,而在类B中使用它将返回false 。 在这两个实例中, isset都将返回false 。 Because property_exists will tell you if its even a def ... -
使用: if (typeof something === "undefined") { alert("something is undefined"); } 如果一个具有某些属性的对象变量可以像这样使用相同的东西: if (typeof my_obj.someproperties === "undefined"){ console.log('the property is not available...'); // print into console } Use: if (typeo ...
-
在第一个条件中,isset()访问$ entity,检查属性是否存在。 在Seccond条件下,您可以显式访问属性$ entity-> filter。 当您访问属性时,不存在该属性,将生成该属性并使用null初始化。 然后你可以使用它或为它赋值。 因为isset()访问该属性以检查它是否是具有键“where”的数组,所以它生成一个null属性。 这称为重载以生成动态属性: http : //php.net/manual/en/language.oop5.overloading.php In the firs ...
-
因为Guzzle class Result implements ResultInterface扩展ArrayAccess class Result implements ResultInterface , ArrayAccess你必须使用$result['retry_after']来获取你的属性。 var_dump( $result['retry_after'] ); var_dump( isset( $result['retry_after'] ) ); https://github.com/guz ...
-
你应该像这样调用构造函数: class EmailTemplate { private $templateFile; function __construct( $args ) { // Loop through the arguments foreach ( $args as $key => $val ) { // Check if the current cla ...
-
for (x in y)不是用于遍历数组中的对象的正确构造。 它仅用于迭代对象的键。 所以发生的事情是,不是获取两个Entity对象,而是member变量分别指向那些对象的索引,分别是1和2 。 遍历这些对象的正确方法是: for(var i = 0; i < members.length; i++) { EntityID == members[i].EntityID; } for (x in y) is not the right construct to iterate through obj ...
-
我不知道你的ApplicationDbContext怎么样,但我认为你必须在它的声明中加入类似这样的东西: public class ApplicationDbContext : IdentityDbContext
I don't know how is your ApplicationDbContext, but I think you have to put something like this in the dec ... -
我看到你正在使用Laravel,所以我猜这是Eloquent模型。 他们可能正在使用魔术方法从数据库列创建动态属性和方法。 看看这里: http : //php.net/manual/en/language.oop5.overloading.php 因此,每次请求属性时,他们都会检查是否存在任何列或关系,而不是拥有真实属性,而是返回该属性。 您可以使用getAttributes()方法获取模型属性( https://github.com/illuminate/database/blob/master/Elo ...
-
如果属性存在, property_exists将返回true,无论属性和调用者的范围是什么。 get_class_vars将返回可从当前作用域访问的所有属性及其静态值或默认值(对于未声明为static的属性) 。 但是,它不会返回未在类体中声明的属性,也不会接受对象参数。 请注意,如果使用类名查询未在类主体中声明的属性(即:对象上下文),则property_exists也将返回false。 每个例子: class Foo { public $foo; private $bar; p ...
-
我认为你一定做错了,你在帖子中没有提到。 以下代码按预期工作,并将MyTestPropertyName打印到控制台窗口。 public partial class MainWindow : Window { public MainWindow() { DataContext = new MyViewModel(); } private void Window_Loaded(object sender, RoutedEventArgs e) { ...