bluebat8009
V2EX  ›  PHP

求教,在 PHP7 中做扩展开发,我想知道执行 PHP 脚本的路径,如何获取呢

  •  
  •   bluebat8009 · Oct 23, 2019 · 4992 views
    This topic created in 2569 days ago, the information mentioned may be changed or developed.
    6 replies  •  2019-11-07 17:52:25 +08:00
    bluebat8009
    bluebat8009
    OP
    Oct 23, 2019
    1
    实际上,就是在 PHP 的扩展中如何实现 PHP 的__FILE__常量了
    UpThemountain
    UpThemountain
    Oct 23, 2019
    2
    能不能变相传入路径?我也准备做扩展开发方面的研究学习 方便加 V 交流学习?
    wx:chen_1992227
    bluebat8009
    bluebat8009
    OP
    Oct 23, 2019
    3
    @UpThemountain 系统应该有个默认的系统变量了,但是我目前不知道,就是我想再某些路径里面,这个扩展的某些函数不启作用
    jjshare
    jjshare
    Oct 23, 2019
    4
    什么情况下需要用扩展解决
    agdhole
    agdhole
    Oct 23, 2019
    5
    Windows 可以用
    Get-Command 'php.exe' -erroraction silentlycontinue -Syntax
    szopen
    szopen
    Nov 7, 2019
    6
    当前文件路径在 execute_data 结构中可以获取到,execute_data 就是 PHP_FUNCTION 宏的第一个参数
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5405 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 02:05 · PVG 10:05 · LAX 18:05 · JFK 21:05
    ♥ Do have faith in what you're doing.