*編輯* 重新安裝模塊後,一切工作正常。PHP exec()和自定義Python模塊
我在我的網絡服務器上安裝了一個python模塊。
當我做的「where is蟒蛇」我得到以下路徑:
python: /usr/bin/python2.4 /usr/bin/python /usr/lib/python2.4 /usr/include/python2.4 /usr/share/man/man1/python.1.gz
後來當我檢查我的模塊路徑,有人在這裏安裝:
/usr/llib/python2.4/site-packages/MyModule/myModule
在我的PHP腳本
現在,我我在做這個:
exec("python /usr/lib/python2.4/site-packages/MyModule/myModule script.py -v pixfx.xml 2>&1", $output, $return);
這個腳本沒有得到執行。
到目前爲止我所做的任何問題?
感謝
*******************編輯******************
#! /usr/bin/env python
import sys
import os
import getopt
import re
from fontTools.ttLib import TTFont
from fontTools.ttLib.tables.otBase import OTLOffsetOverflowError
from fontTools.ttLib.tables.otTables import fixLookupOverFlows, fixSubTableOverFlows
from fontTools.misc.macCreatorType import getMacCreatorAndType
from fontTools import version
不要在標題中加入'SOLVED:'之類的東西。 – 2015-12-25 09:42:45