Fix php pragmas example include path

Was not working for out of source builds
This commit is contained in:
William S Fulton 2019-05-09 07:35:24 +01:00
commit 3ccc904b06
3 changed files with 7 additions and 4 deletions

View file

@ -21,11 +21,11 @@
zend_printf("This was %%rshutdown\n"); zend_printf("This was %%rshutdown\n");
} }
%pragma(php) include="./include.php"; %pragma(php) include="include.php";
%pragma(php) code=" %pragma(php) code="
# This code is inserted into example.php # This code is inserted into example.php
echo \"this was php code\\n\"; echo \"This was php code\\n\";
" "
%pragma(php) version="1.5" %pragma(php) version="1.5"

View file

@ -1,7 +1,7 @@
<?php <?php
# This code is inserted into example.php # This code is inserted into example.php
echo "this is include.php\n"; echo "This is include.php\n";
?> ?>

View file

@ -1,6 +1,9 @@
<?php <?php
# For finding include.php
set_include_path(realpath(dirname(__FILE__)) . PATH_SEPARATOR . get_include_path());
require "example.php"; require "example.php";
echo "Version - " . ((new ReflectionExtension('example'))->getVersion()); echo "Version - " . ((new ReflectionExtension('example'))->getVersion()) . "\n";
?> ?>