handle file:// includes

Now that we can include urls, we shoudl handle `file://`.
Esse commit está contido em:
Paul Tarjan
2013-07-24 14:59:07 -07:00
commit de Sara Golemon
commit 6faa4e2ca6
5 arquivos alterados com 12 adições e 0 exclusões
+5
Ver Arquivo
@@ -492,6 +492,11 @@ static bool findFileWrapper(CStrRef file, void* ctx) {
}
}
// handle file://
if (file.substr(0, 7) == "file://") {
return findFileWrapper(file.substr(7), ctx);
}
// TranslatePath() will canonicalize the path and also check
// whether the file is in an allowed directory.
String translatedPath = File::TranslatePathKeepRelative(file);
+3
Ver Arquivo
@@ -0,0 +1,3 @@
<?php
include 'file://'.__DIR__.'/hello.inc';
@@ -0,0 +1 @@
Hello World
+3
Ver Arquivo
@@ -0,0 +1,3 @@
<?php
print "Hello World";